[oe-commits] [openembedded-core] 27/91: lib/oe/gpg_sign: sign rpm packages in chunks of 100

git at git.openembedded.org git at git.openembedded.org
Wed Mar 1 12:56:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 874f5016fd4dc76bc867b68470297fe59e78a9e6
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Thu Feb 23 12:23:50 2017 +0200

    lib/oe/gpg_sign: sign rpm packages in chunks of 100
    
    Split the file list into chunks in order to avoid
    "OSError: [Errno 7] Argument list too long"
    
    This would happend when a package has huge amount of subpackages, e.g.
    glibc-locale.
    
    [YOCTO #11069]
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oe/gpg_sign.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index dcd1990..bf36226 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -35,11 +35,12 @@ class LocalSigner(object):
             cmd += "--define '%%__gpg %s' " % self.gpg_bin
         if self.gpg_path:
             cmd += "--define '_gpg_path %s' " % self.gpg_path
-        cmd += ' '.join(files)
 
-        status, output = oe.utils.getstatusoutput(cmd)
-        if status:
-            raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
+        # Sign in chunks of 100 packages
+        for i in range(0, len(files), 100):
+            status, output = oe.utils.getstatusoutput(cmd + ' '.join(files[i:i+100]))
+            if status:
+                raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
 
     def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
         """Create a detached signature of a file"""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list