summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-02-23 12:23:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 12:54:19 +0000
commit874f5016fd4dc76bc867b68470297fe59e78a9e6 (patch)
treeee987ad6814f62a09fc3c241081f8d8a301ab583 /meta/lib
parentc0ab96a7b7d2c41167e2ad79be76f6eec2b6ebb5 (diff)
downloadopenembedded-core-874f5016fd4dc76bc867b68470297fe59e78a9e6.tar.gz
openembedded-core-874f5016fd4dc76bc867b68470297fe59e78a9e6.tar.bz2
openembedded-core-874f5016fd4dc76bc867b68470297fe59e78a9e6.zip
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@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/gpg_sign.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index dcd1990930..bf36226791 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"""