diff options
author | Ioan-Adrian Ratiu <adrian.ratiu@ni.com> | 2016-03-10 12:02:57 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-11 16:50:45 +0000 |
commit | 14e809e03a1ecfb3b543197cdcfba25cc5bc6265 (patch) | |
tree | 5065fa7fb33f08b4d730f6e5194dcb587a5953d8 /meta/lib/oe/gpg_sign.py | |
parent | 0b088e0829f0187cd67df97b6825674a5a4087ce (diff) | |
download | poky-14e809e03a1ecfb3b543197cdcfba25cc5bc6265.tar.gz |
gpg_sign: export_pubkey: add signature type support
Add support for multiple types of signatures (binary or ascii)
in export_pubkey(). There is no change in behaviour for the function,
the previous implicit default is the new parameter "armor" default.
(From OE-Core rev: 95ba4a982b887444908207e3180fe4bc46281d3b)
Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/gpg_sign.py')
-rw-r--r-- | meta/lib/oe/gpg_sign.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py index 0b5dc20892..e738397880 100644 --- a/meta/lib/oe/gpg_sign.py +++ b/meta/lib/oe/gpg_sign.py | |||
@@ -12,12 +12,14 @@ class LocalSigner(object): | |||
12 | self.gpg_path = d.getVar('GPG_PATH', True) | 12 | self.gpg_path = d.getVar('GPG_PATH', True) |
13 | self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm") | 13 | self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm") |
14 | 14 | ||
15 | def export_pubkey(self, output_file, keyid): | 15 | def export_pubkey(self, output_file, keyid, armor=True): |
16 | """Export GPG public key to a file""" | 16 | """Export GPG public key to a file""" |
17 | cmd = '%s --batch --yes --export --armor -o %s ' % \ | 17 | cmd = '%s --batch --yes --export -o %s ' % \ |
18 | (self.gpg_bin, output_file) | 18 | (self.gpg_bin, output_file) |
19 | if self.gpg_path: | 19 | if self.gpg_path: |
20 | cmd += "--homedir %s " % self.gpg_path | 20 | cmd += "--homedir %s " % self.gpg_path |
21 | if armor: | ||
22 | cmd += "--armor " | ||
21 | cmd += keyid | 23 | cmd += keyid |
22 | status, output = oe.utils.getstatusoutput(cmd) | 24 | status, output = oe.utils.getstatusoutput(cmd) |
23 | if status: | 25 | if status: |