diff --git a/debian/changelog b/debian/changelog index 675ef67..eb00d63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ ubuntu-dev-tools (0.102) UNRELEASED; urgency=low * syncpackage: - Don't upload orig tarball if not needed. - Print error message if the download fails (LP: #639899). + - Check if the specified Debian component is valid (LP: #639896). * update-maintainer: Don't change the Maintainer field if the email is set to a @lists.ubuntu.com address. * sponsor-patch: New script to download a patch from a Launchpad bug, patch @@ -37,7 +38,7 @@ ubuntu-dev-tools (0.102) UNRELEASED; urgency=low * Fix NAME section of lp-set-dup(1). * lp-list-bugs: New tool. - -- Benjamin Drung Sun, 19 Sep 2010 22:07:52 +0200 + -- Benjamin Drung Mon, 20 Sep 2010 00:42:35 +0200 ubuntu-dev-tools (0.101) unstable; urgency=low diff --git a/syncpackage b/syncpackage index 48b27c6..22bd373 100755 --- a/syncpackage +++ b/syncpackage @@ -400,7 +400,7 @@ if __name__ == "__main__": parser.add_option("-V", "--debian-version", help="Specify the version to sync from.", dest="debversion", default=None) parser.add_option("-c", "--component", - help="Specify the component to sync from.", dest="component", default=None) + help="Specify the Debian component to sync from.", dest="component", default=None) parser.add_option("-v", "--verbose", help="print more information", dest="verbose", action="store_true", default=False) parser.add_option("-n", "--uploader-name", dest="uploader_name", @@ -441,6 +441,11 @@ if __name__ == "__main__": if args[0].endswith(".dsc"): dscurl = args[0] else: + if options.component not in (None, "main", "contrib", "non-free"): + print >> sys.stderr, "%s: Error: %s is not a valid Debian component." \ + " It should be one of main, contrib, or non-free." % \ + (script_name, options.component) + sys.exit(1) dscurl = get_debian_dscurl(args[0], options.dist, options.release, options.debversion, options.component)