Skip to contentSkip to conversation

recipe_sanity: Don't bother checking LICENSE

PATCH Applied Phil Blundell 2 participants 2 messages Oct 1, 2012 – Oct 18, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 recipe_sanity: Don't bother checking LICENSE

Since e3d7890cace71b0a57d2530bf615a58dcb46d96f or so, base.bbclass has considered invalid LICENSE settings to be a fatal error. This means we will never see them so there is no point checking for that.

---
 meta/classes/recipe_sanity.bbclass |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
meta/classes/recipe_sanity.bbclass +2 -7
index c3bd0d2..bf378ea 100644
@@ -13,7 +13,7 @@ def bad_runtime_vars(cfgdata, d):
             __note("%s should be %s_${PN}" % (var, var), d)
 
 __recipe_sanity_reqvars = "DESCRIPTION"
-__recipe_sanity_reqdiffvars = "LICENSE"
+__recipe_sanity_reqdiffvars = ""
 def req_vars(cfgdata, d):
     for var in d.getVar("__recipe_sanity_reqvars", True).split():
         if not d.getVar(var, 0):
@@ -23,11 +23,6 @@ def req_vars(cfgdata, d):
         val = d.getVar(var, 0)
         cfgval = cfgdata.get(var)
 
-        # Hardcoding is bad, but I'm lazy.  We don't care about license being
-        # unset if the recipe has no sources!
-        if var == "LICENSE" and d.getVar("SRC_URI", True) == cfgdata.get("SRC_URI"):
-            continue
-
         if not val:
             __note("%s should be set" % var, d)
         elif val == cfgval:
@@ -93,7 +88,7 @@ def can_remove_FILESDIR(cfgdata, d):
             expanded == d.expand(expected))
 
 def can_remove_others(p, cfgdata, d):
-    for k in ["S", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
+    for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
               "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
     #for k in cfgdata:
         unexpanded = d.getVar(k, 0)
Signature · 1 line
1.7.10.4
Applied
#1 lore raw
Quoted 36 lines · Phil Blundell

Since e3d7890cace71b0a57d2530bf615a58dcb46d96f or so, base.bbclass has considered invalid LICENSE settings to be a fatal error. This means we will never see them so there is no point checking for that.

---
  meta/classes/recipe_sanity.bbclass |    9 ++-------
  1 file changed, 2 insertions(+), 7 deletions(-)
meta/classes/recipe_sanity.bbclass +1 -6
index c3bd0d2..bf378ea 100644
@@ -13,7 +13,7 @@ def bad_runtime_vars(cfgdata, d):
              __note("%s should be %s_${PN}" % (var, var), d)
 
  __recipe_sanity_reqvars = "DESCRIPTION"
-__recipe_sanity_reqdiffvars = "LICENSE"
+__recipe_sanity_reqdiffvars = ""
  def req_vars(cfgdata, d):
      for var in d.getVar("__recipe_sanity_reqvars", True).split():
          if not d.getVar(var, 0):
@@ -23,11 +23,6 @@ def req_vars(cfgdata, d):
          val = d.getVar(var, 0)
          cfgval = cfgdata.get(var)
 
-        # Hardcoding is bad, but I'm lazy.  We don't care about license being
-        # unset if the recipe has no sources!
-        if var == "LICENSE" and d.getVar("SRC_URI", True) == cfgdata.get("SRC_URI"):
-            continue
-
          if not val:
              __note("%s should be set" % var, d)
          elif val == cfgval:

meta/classes/recipe_sanity.bbclass def can_remove_FILESDIR(cfgdata, d): · line 94

Quoted 8 lines
meta/classes/recipe_sanity.bbclass +1 -1
@@ -93,7 +88,7 @@ def can_remove_FILESDIR(cfgdata, d):
              expanded == d.expand(expected))
 
  def can_remove_others(p, cfgdata, d):
-    for k in ["S", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
+    for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
                "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
      #for k in cfgdata:
          unexpanded = d.getVar(k, 0)

Merged into OE-Core

Thanks
Sau!