summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-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 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: