Skip to contentSkip to conversation

package: Change PACKAGE_BBCLASS_VERSION

PATCH New Richard Purdie 1 participant 2 messages Sep 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package: Change PACKAGE_BBCLASS_VERSION

The silent rpmdeps failures fixed in a preceeding commit mean we need to rerun all packaging.

---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package.bbclass +1 -1
index a051617..7a62181 100644
@@ -2073,7 +2073,7 @@ python do_package () {
     # cache.  This is useful if an item this class depends on changes in a
     # way that the output of this class changes.  rpmdeps is a good example
     # as any change to rpmdeps requires this to be rerun.
-    # PACKAGE_BBCLASS_VERSION = "1"
+    # PACKAGE_BBCLASS_VERSION = "2"
 
     # Init cachedpath
     global cpath
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 package_manager: Clean up horrible 'None' return values

If this fails the exception will now be raised. Lets use that and drop all this 'None' return value ugliness.

---
 meta/lib/oe/package_manager.py | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)
meta/lib/oe/package_manager.py +4 -15
index 5efb286..994e462 100644
@@ -17,18 +17,11 @@ from oe.gpg_sign import get_signer
 def create_index(arg):
     index_cmd = arg
 
-    try:
-        bb.note("Executing '%s' ..." % index_cmd)
-        result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
-    except subprocess.CalledProcessError as e:
-        return("Index creation command '%s' failed with return code %d:\n%s" %
-               (e.cmd, e.returncode, e.output.decode("utf-8")))
-
+    bb.note("Executing '%s' ..." % index_cmd)
+    result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
     if result:
         bb.note(result)
 
-    return None
-
 """
 This method parse the output from the package managerand return
 a dictionary with the information of the packages. This is used
@@ -164,9 +157,7 @@ class OpkgIndexer(Indexer):
             bb.note("There are no packages in %s!" % self.deploy_dir)
             return
 
-        result = oe.utils.multiprocess_exec(index_cmds, create_index)
-        if result:
-            bb.fatal('%s' % ('\n'.join(result)))
+        oe.utils.multiprocess_exec(index_cmds, create_index)
 
         if signer:
             feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
@@ -247,9 +238,7 @@ class DpkgIndexer(Indexer):
             bb.note("There are no packages in %s" % self.deploy_dir)
             return
 
-        result = oe.utils.multiprocess_exec(index_cmds, create_index)
-        if result:
-            bb.fatal('%s' % ('\n'.join(result)))
+        oe.utils.multiprocess_exec(index_cmds, create_index)
         if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
             raise NotImplementedError('Package feed signing not implementd for dpkg')
 
Signature · 1 line
2.7.4