--- mga-gnome/trunk/mga-gnome 2012/02/28 12:37:23 3119 +++ mga-gnome/trunk/mga-gnome 2012/02/28 13:02:47 3120 @@ -40,10 +40,13 @@ import email from email.mime.text import MIMEText +# to be able to sleep for a while +import time MEDIA="Core Release Source" URL="http://download.gnome.org/sources/" PKGROOT='~/pkgs' +SLEEP_INITIAL=300 re_majmin = re.compile(r'^([0-9]+\.[0-9]+).*') re_version = re.compile(r'([-.]|\d+|[^-.\d]+)') @@ -495,7 +498,7 @@ if len(downstream[upstream]) != 1: # XXX - Make it more intelligent - raise ValueError("ERROR: Multiple packages found for %s: %s" % (upstream, ", ".join(downstream[upstream]))) + raise ValueError("Multiple packages found for %s: %s" % (upstream, ", ".join(downstream[upstream]))) return list(downstream[upstream]) @@ -654,8 +657,11 @@ if options.mail: _send_reply_mail(stdout, msg, options.mail) sys.exit(1) + if options.wait: + time.sleep(SLEEP_INITIAL) + for package in packages: - subprocess.call(['mga-gnome', 'increase', '-s', '--hash', hexdigest, package, version], stdout=stdout, stderr=stderr) + subprocess.call(['mga-gnome', 'increase', '--submit', '--hash', hexdigest, package, version], stdout=stdout, stderr=stderr) if options.mail: _send_reply_mail(stdout, msg, options.mail) @@ -709,6 +715,8 @@ subparser = subparsers.add_parser('gnome-release-email', help='Submit packages based on GNOME ftp-release-list email') subparser.add_argument("-m", "--mail", help="Email address to send the progress to") + subparser.add_argument("-w", "--wait", action="store_true", + help="Wait before trying to retrieve the new version") subparser.set_defaults( func=cmd_parse_ftp_release_list )