summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-02-10 16:15:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-19 01:01:25 +0000
commitd5be8666a1f429283e8200ef67f1fc3afa587c4f (patch)
treeb7ffd21c1147619b6f3965dbd5d3550aeb73158a
parent03554b77cda6380e9ca49114a3405b7e449498ae (diff)
downloadpoky-d5be8666a1f429283e8200ef67f1fc3afa587c4f.tar.gz
oe/gpg_sign: add 'armor' argument to detach_sign()
[YOCTO #9006] (From OE-Core rev: ce653694a87fd77d79ec3d28ed3365a2c8e57ad6) 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>
-rw-r--r--meta/lib/oe/gpg_sign.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index a4f310e536..16a23645b6 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -52,13 +52,15 @@ class LocalSigner(object):
52 bb.error('rpmsign failed: %s' % proc.before.strip()) 52 bb.error('rpmsign failed: %s' % proc.before.strip())
53 raise bb.build.FuncFailed("Failed to sign RPM packages") 53 raise bb.build.FuncFailed("Failed to sign RPM packages")
54 54
55 def detach_sign(self, input_file): 55 def detach_sign(self, input_file, armor=True):
56 """Create a detached signature of a file""" 56 """Create a detached signature of a file"""
57 cmd = "%s --detach-sign --armor --batch --no-tty --yes " \ 57 cmd = "%s --detach-sign --batch --no-tty --yes " \
58 "--passphrase-file '%s' -u '%s' " % \ 58 "--passphrase-file '%s' -u '%s' " % \
59 (self.gpg_bin, self.passphrase_file, self.keyid) 59 (self.gpg_bin, self.passphrase_file, self.keyid)
60 if self.gpg_path: 60 if self.gpg_path:
61 cmd += "--homedir %s " % self.gpg_path 61 cmd += "--homedir %s " % self.gpg_path
62 if armor:
63 cmd += "--armor "
62 cmd += input_file 64 cmd += input_file
63 status, output = oe.utils.getstatusoutput(cmd) 65 status, output = oe.utils.getstatusoutput(cmd)
64 if status: 66 if status: