Octavio Galland has proposed merging 
~octagalland/ubuntu-qa-tools:unembargo_default_to_release_pocket_for_ppas into 
ubuntu-qa-tools:master.

Commit message:
unembargo: default to Release pocket when unembargo-ing to a PPA

Requested reviews:
  Ubuntu Bug Control (ubuntu-bugcontrol)

For more details, see:
https://code.launchpad.net/~octagalland/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/479086

This is in order to avoid having to explicitly set `--pocket release` every 
time an unembargo to a PPA is made.
-- 
Your team Ubuntu Bug Control is requested to review the proposed merge of 
~octagalland/ubuntu-qa-tools:unembargo_default_to_release_pocket_for_ppas into 
ubuntu-qa-tools:master.
diff --git a/security-tools/unembargo b/security-tools/unembargo
index d1be66e..e49467f 100755
--- a/security-tools/unembargo
+++ b/security-tools/unembargo
@@ -81,8 +81,8 @@ parser.add_argument("--retries", help="Retry failed sync at most RETRIES times",
                     action='store', metavar="RETRIES",
                     default=1, type=int)
 parser.add_argument("--pocket", help="The destination pocket "
-                    "(default: Security)", metavar="POCKET", action='store',
-                    default=SECURITY_POCKET)
+                    "(default: Security for Ubuntu Archive, Release for all others)", metavar="POCKET", action='store',
+                    default=None)
 parser.add_argument("--source-pocket", help="The pocket to restrict the copy "
                     "from (default: None)",
                     metavar="SOURCE_POCKET", action='store', default=None)
@@ -100,6 +100,14 @@ if len(args) < 1:
     print('Usage: %s [OPTIONS] PKG [PKG...]' % sys.argv[0], file=sys.stderr)
     sys.exit(1)
 
+# Default to Security pocket, unless we're releasing to a PPA (in which case,
+# default to Release pocket)
+if opt.pocket is None:
+    if opt.destination == UBUNTU_ARCHIVE:
+        opt.pocket = SECURITY_POCKET
+    else:
+        opt.pocket = RELEASE_POCKET
+
 # If --esm, --esm-apps, --esm-infra, or --esm-infra-legacy option is provided,
 # the script will move from the respective ESM staging PPA to the respective
 # ESM PROD PPA. So the user should not indicate such values.
_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-bugcontrol
Post to     : ubuntu-bugcontrol@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-bugcontrol
More help   : https://help.launchpad.net/ListHelp

Reply via email to