diff options
author | lloyd <[email protected]> | 2013-03-02 23:50:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-03-02 23:50:34 +0000 |
commit | e70c79fd23a7fe03e576f3c11dcf2ed0b75796e2 (patch) | |
tree | 8fa8b26d6460181f2534a6527ca566a61f663623 /src/build-data | |
parent | f200455a931c7307c5e7e3f7ad6809697c773e66 (diff) |
Run GPG at the end, sadly can't sign all files at once
Diffstat (limited to 'src/build-data')
-rwxr-xr-x | src/build-data/scripts/dist.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/build-data/scripts/dist.py b/src/build-data/scripts/dist.py index 5738d6597..e54d40869 100755 --- a/src/build-data/scripts/dist.py +++ b/src/build-data/scripts/dist.py @@ -83,15 +83,16 @@ def datestamp(db, rev_id): logging.info('Could not retreive date for %s' % (rev_id)) return 0 -def gpg_sign(file, keyid): - logging.info('Signing %s using PGP id %s' % (file, keyid)) +def gpg_sign(keyid, files): + for filename in files: + logging.info('Signing %s using PGP id %s' % (filename, keyid)) - gpg = subprocess.Popen(['gpg', '--armor', '--detach-sign', - '--local-user', keyid, file], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + gpg = subprocess.Popen(['gpg', '--armor', '--detach-sign', + '--local-user', keyid, filename], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) - check_subprocess_results(gpg, 'gpg') + check_subprocess_results(gpg, 'gpg') def parse_args(args): parser = optparse.OptionParser() @@ -204,16 +205,15 @@ def main(args = None): archive = tarfile.open(output_tgz, 'w:gz') archive.add(output_basename) archive.close() - if options.pgp_key_id != '': - gpg_sign(output_tgz, options.pgp_key_id) remove_file_if_exists(output_tbz) remove_file_if_exists(output_tbz + '.asc') archive = tarfile.open(output_tbz, 'w:bz2') archive.add(output_basename) archive.close() + if options.pgp_key_id != '': - gpg_sign(output_tbz, options.pgp_key_id) + gpg_sign(options.pgp_key_id, [output_tbz, output_tgz]) shutil.rmtree(output_basename) |