40 |
import email |
import email |
41 |
from email.mime.text import MIMEText |
from email.mime.text import MIMEText |
42 |
|
|
43 |
|
# to be able to sleep for a while |
44 |
|
import time |
45 |
|
|
46 |
MEDIA="Core Release Source" |
MEDIA="Core Release Source" |
47 |
URL="http://download.gnome.org/sources/" |
URL="http://download.gnome.org/sources/" |
48 |
PKGROOT='~/pkgs' |
PKGROOT='~/pkgs' |
49 |
|
SLEEP_INITIAL=300 |
50 |
|
|
51 |
re_majmin = re.compile(r'^([0-9]+\.[0-9]+).*') |
re_majmin = re.compile(r'^([0-9]+\.[0-9]+).*') |
52 |
re_version = re.compile(r'([-.]|\d+|[^-.\d]+)') |
re_version = re.compile(r'([-.]|\d+|[^-.\d]+)') |
498 |
|
|
499 |
if len(downstream[upstream]) != 1: |
if len(downstream[upstream]) != 1: |
500 |
# XXX - Make it more intelligent |
# XXX - Make it more intelligent |
501 |
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]))) |
502 |
|
|
503 |
return list(downstream[upstream]) |
return list(downstream[upstream]) |
504 |
|
|
657 |
if options.mail: _send_reply_mail(stdout, msg, options.mail) |
if options.mail: _send_reply_mail(stdout, msg, options.mail) |
658 |
sys.exit(1) |
sys.exit(1) |
659 |
|
|
660 |
|
if options.wait: |
661 |
|
time.sleep(SLEEP_INITIAL) |
662 |
|
|
663 |
for package in packages: |
for package in packages: |
664 |
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) |
665 |
|
|
666 |
if options.mail: _send_reply_mail(stdout, msg, options.mail) |
if options.mail: _send_reply_mail(stdout, msg, options.mail) |
667 |
|
|
715 |
|
|
716 |
subparser = subparsers.add_parser('gnome-release-email', help='Submit packages based on GNOME ftp-release-list email') |
subparser = subparsers.add_parser('gnome-release-email', help='Submit packages based on GNOME ftp-release-list email') |
717 |
subparser.add_argument("-m", "--mail", help="Email address to send the progress to") |
subparser.add_argument("-m", "--mail", help="Email address to send the progress to") |
718 |
|
subparser.add_argument("-w", "--wait", action="store_true", |
719 |
|
help="Wait before trying to retrieve the new version") |
720 |
subparser.set_defaults( |
subparser.set_defaults( |
721 |
func=cmd_parse_ftp_release_list |
func=cmd_parse_ftp_release_list |
722 |
) |
) |