summaryrefslogtreecommitdiffstats
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 23:27:07 +0000
commitba5f3143a7d112b5f8b7523a675768c87b403a70 (patch)
treea9c2a0489e7e579d14bd348fbd30f3624de9cc89 /meta/lib
parent6c23b6c5866ed952f004ff7cae24a905713b2641 (diff)
downloadpoky-ba5f3143a7d112b5f8b7523a675768c87b403a70.tar.gz
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] (From OE-Core rev: 874f5016fd4dc76bc867b68470297fe59e78a9e6) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
35 cmd += "--define '%%__gpg %s' " % self.gpg_bin 35 cmd += "--define '%%__gpg %s' " % self.gpg_bin
36 if self.gpg_path: 36 if self.gpg_path:
37 cmd += "--define '_gpg_path %s' " % self.gpg_path 37 cmd += "--define '_gpg_path %s' " % self.gpg_path
38 cmd += ' '.join(files)
39 38
40 status, output = oe.utils.getstatusoutput(cmd) 39 # Sign in chunks of 100 packages
41 if status: 40 for i in range(0, len(files), 100):
42 raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output) 41 status, output = oe.utils.getstatusoutput(cmd + ' '.join(files[i:i+100]))
42 if status:
43 raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
43 44
44 def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True): 45 def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
45 """Create a detached signature of a file""" 46 """Create a detached signature of a file"""