# HG changeset patch # User Bernhard Herzog # Date 1236614444 0 # Node ID a3f10658052574f282af14d9133861b88358d1a4 # Parent 5dd710b167d212b48b61c46c175918b8942571b0 Add config settings "distribution" and "section" so that they don't have to be specified when running bin/publishpackages.py most of the time. Add them to demopublishpackages.cfg as well. diff -r 5dd710b167d2 -r a3f106580525 bin/publishpackages.py --- a/bin/publishpackages.py Fri Mar 06 19:57:04 2009 +0000 +++ b/bin/publishpackages.py Mon Mar 09 16:00:44 2009 +0000 @@ -30,7 +30,8 @@ """ return os.path.expandvars(os.path.expanduser(filename)) -config_desc = ["build_user", "build_host", "build_listpackages", +config_desc = ["distribution", "section", + "build_user", "build_host", "build_listpackages", "publish_user", "publish_host", "publish_apt_archive_update", ("publish_dir", remove_trailing_slashes), ("cachedir", @@ -113,6 +114,11 @@ def publish_packages(config_filename, track, revision, dist, section): config = read_config(config_filename) + if dist is None: + dist = config["distribution"] + if section is None: + section = config["section"] + for arch in ["binary-i386", "source"]: publish_packages_arch(config, track, revision, dist, section, arch) @@ -123,10 +129,6 @@ def main(): options, args = parse_commandline() - for required_opt in ["dist", "section"]: - if getattr(options, required_opt) is None: - print >>sys.stderr, "The --%s option must be given" % required_opt - sys.exit(1) publish_packages(options.config_file, options.track, options.revision, options.dist, options.section) diff -r 5dd710b167d2 -r a3f106580525 demopublishpackages.cfg --- a/demopublishpackages.cfg Fri Mar 06 19:57:04 2009 +0000 +++ b/demopublishpackages.cfg Mon Mar 09 16:00:44 2009 +0000 @@ -4,6 +4,11 @@ # adapt it to your needs. [publishpackages] +# Distribution (e.g. etch, lenny, ...) and section (e.g. experimental, +# unstable, ...) for which to publish the packages +distribution: lenny +section: experimental + # Username and host on which the treepackager runs. publishpackages.py # has to be able to connect to that host as the builduser via ssh # without knowning the password. This is best achieved with the