From 33587a8612c1d14fba4dd84ba0f6bedbbd6cfa13 Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Wed, 29 Sep 2004 10:15:33 +0000 Subject: more lint changes BKrev: 415a8b45sj56tRu3DNvk-RtKBIdS5w --- classes/oelint.oeclass | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'classes/oelint.oeclass') diff --git a/classes/oelint.oeclass b/classes/oelint.oeclass index c4f24002e1..d7df1dd641 100644 --- a/classes/oelint.oeclass +++ b/classes/oelint.oeclass @@ -17,19 +17,59 @@ python do_lint() { testVar("DESCRIPTION") + ############################## + # Test that HOMEPAGE exists + # + s = testVar("HOMEPAGE") + if s=="unknown": + oe.error("HOMEPAGE is not set") + elif not s.startswith("http://"): + oe.error("HOMEPAGE doesn't start with http://") + + + ############################## # Test for valid LICENSE # + valid_licenses = { + "GPL-2" : "GPLv2", + "GPL LGPL FDL" : True, + "GPL PSF" : True, + "GPL/QPL" : True, + "GPL" : True, + "GPLv2" : True, + "IBM" : True, + "LGPL GPL" : True, + "LGPL" : True, + "MIT" : True, + "OSL" : True, + "Perl" : True, + "Public Domain" : True, + "QPL" : "GPL/QPL", + } s = testVar("LICENSE") if s=="unknown": oe.error("LICENSE is not set") + elif s.startswith("Vendor"): + pass + else: + try: + newlic = valid_licenses[s] + if newlic == False: + oe.note("LICENSE '%s' is not recommended" % s) + elif newlic != True: + oe.note("LICENSE '%s' is not recommended, better use '%s'" % (s, newsect)) + except: + oe.note("LICENSE '%s' is not recommended" % s) ############################## # Test for valid MAINTAINER # s = testVar("MAINTAINER") - if s and s.find("@") == -1: + if s=="OpenEmbedded Team ": + oe.error("explicit MAINTAINER is missing, using default") + elif s and s.find("@") == -1: oe.error("You forgot to put an e-mail address into MAINTAINER") -- cgit v1.2.3