From: Markus Lehtonen Date: Wed, 10 Feb 2016 14:15:56 +0000 (+0200) Subject: oe/gpg_sign: add 'armor' argument to detach_sign() X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~26915 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce653694a87fd77d79ec3d28ed3365a2c8e57ad6;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oe/gpg_sign: add 'armor' argument to detach_sign() [YOCTO #9006] Signed-off-by: Markus Lehtonen Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py index a4f310e536b..16a23645b66 100644 --- a/meta/lib/oe/gpg_sign.py +++ b/meta/lib/oe/gpg_sign.py @@ -52,13 +52,15 @@ class LocalSigner(object): bb.error('rpmsign failed: %s' % proc.before.strip()) raise bb.build.FuncFailed("Failed to sign RPM packages") - def detach_sign(self, input_file): + def detach_sign(self, input_file, armor=True): """Create a detached signature of a file""" - cmd = "%s --detach-sign --armor --batch --no-tty --yes " \ + cmd = "%s --detach-sign --batch --no-tty --yes " \ "--passphrase-file '%s' -u '%s' " % \ (self.gpg_bin, self.passphrase_file, self.keyid) if self.gpg_path: cmd += "--homedir %s " % self.gpg_path + if armor: + cmd += "--armor " cmd += input_file status, output = oe.utils.getstatusoutput(cmd) if status: