]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oe/gpg_sign: add 'armor' argument to detach_sign()
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 10 Feb 2016 14:15:56 +0000 (16:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Feb 2016 22:55:11 +0000 (22:55 +0000)
[YOCTO #9006]

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>
meta/lib/oe/gpg_sign.py

index a4f310e536bf3f17e6849e50557b52dd01027f2f..16a23645b663bfa09a5ef8a4d8e6b7c2f53967c6 100644 (file)
@@ -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: