Allow the user to sync multiple packages at one time (LP: #1756748).

This commit is contained in:
Simon Quigley 2023-08-04 14:38:46 -05:00
parent bed2dc470d
commit 784e7814e9
2 changed files with 74 additions and 66 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
ubuntu-dev-tools (0.196) unstable; urgency=medium
* Allow the user to sync multiple packages at one time (LP: #1756748).
-- Simon Quigley <tsimonq2@debian.org> Fri, 04 Aug 2023 14:37:59 -0500
ubuntu-dev-tools (0.195) unstable; urgency=medium ubuntu-dev-tools (0.195) unstable; urgency=medium
* Add support for the non-free-firmware components in all tools already * Add support for the non-free-firmware components in all tools already

View File

@ -602,7 +602,7 @@ def parse():
metavar="UBUNTU_MIRROR", metavar="UBUNTU_MIRROR",
help=f"Preferred Ubuntu mirror (default: {UDTConfig.defaults['UBUNTU_MIRROR']})", help=f"Preferred Ubuntu mirror (default: {UDTConfig.defaults['UBUNTU_MIRROR']})",
) )
parser.add_argument("package", help=argparse.SUPPRESS) parser.add_argument("package", nargs="*", help=argparse.SUPPRESS)
args = parser.parse_args() args = parser.parse_args()
if args.fakesync: if args.fakesync:
@ -627,7 +627,8 @@ def parse():
# ignored with args.lp, and do not require warnings. # ignored with args.lp, and do not require warnings.
if args.lp: if args.lp:
if args.package.endswith(".dsc"): for package in args.package:
if package.endswith(".dsc"):
parser.error(".dsc files can only be synced using --no-lp.") parser.error(".dsc files can only be synced using --no-lp.")
return args return args
@ -701,8 +702,9 @@ def main():
elif args.uploader_email is None: elif args.uploader_email is None:
args.uploader_email = ubu_email(export=False)[1] args.uploader_email = ubu_email(export=False)[1]
for package in args.package:
src_pkg = fetch_source_pkg( src_pkg = fetch_source_pkg(
args.package, package,
args.distribution, args.distribution,
args.debian_version, args.debian_version,
args.component, args.component,