mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 06:32:12 +02:00
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: 786eafd7b1080eccfe1c7d417eede20d75d80cb0) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 874f5016fd4dc76bc867b68470297fe59e78a9e6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1038cb98e6
commit
fd78c35086
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user