[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.52-30-g246d6b8

Holger Levsen holger at layer-acht.org
Thu May 30 09:32:14 UTC 2013


The following commit has been merged in the develop branch:
commit 246d6b8f9e3321840b8443d2eac58905a56ac601
Author: Andrew Starr-Bochicchio <asb at debian.org>
Date:   Thu May 30 10:50:23 2013 +0200

    move default keyring to distro defaults
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 9d62947..bd47037 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,10 @@ piuparts (0.53) UNRELEASED; urgency=low
   * master-bin/prepare_backup: backup bts_stats.txt and do not backup
     sources.txt.
 
+  [ Andrew Starr-Bochicchio ]
+  * piuparts.py:
+    - Move default keyring to distro defaults.  (Closes: #710346)
+
  -- Andreas Beckmann <anbe at debian.org>  Mon, 27 May 2013 18:24:27 +0200
 
 piuparts (0.52) unstable; urgency=low
diff --git a/piuparts.py b/piuparts.py
index e69e8a6..566a93d 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -84,6 +84,8 @@ class Defaults:
     def get_distribution(self):
         """Return default distribution."""
 
+    def get_keyring(self):
+        """Return default keyring."""
 
 class DebianDefaults(Defaults):
 
@@ -96,6 +98,8 @@ class DebianDefaults(Defaults):
     def get_distribution(self):
         return ["sid"]
 
+    def get_keyring(self):
+        return "/usr/share/keyrings/debian-archive-keyring.gpg"
 
 class UbuntuDefaults(Defaults):
 
@@ -108,6 +112,8 @@ class UbuntuDefaults(Defaults):
     def get_distribution(self):
         return ["saucy"]
 
+    def get_keyring(self):
+        return "/usr/share/keyrings/ubuntu-archive-keyring.gpg"
 
 class DefaultsFactory:
 
@@ -2600,8 +2606,7 @@ def parse_command_line():
                       help="Don't remove the temporary directory for the " +
                            "chroot when the program ends.")
 
-    parser.add_option("-K", "--keyring", metavar="FILE",
-                      default = "/usr/share/keyrings/debian-archive-keyring.gpg",
+    parser.add_option("-K", "--keyring", action="store", metavar="FILE",
                       help="Use FILE as the keyring to use with debootstrap when creating chroots.")
 
     parser.add_option("--keep-sources-list",
@@ -2794,7 +2799,10 @@ def parse_command_line():
     settings.testdebs_repo = opts.testdebs_repo
     settings.debian_distros = opts.distribution
     settings.keep_sources_list = opts.keep_sources_list
-    settings.keyring = opts.keyring
+    if opts.keyring:
+        settings.keyring = opts.keyring
+    else:
+        settings.keyring = defaults.get_keyring()
     settings.do_not_verify_signatures = opts.do_not_verify_signatures
     if settings.do_not_verify_signatures:
         settings.keyringoption=""

-- 
piuparts git repository



More information about the Piuparts-commits mailing list