/[soft]/mga-gnome/trunk/mga-gnome
ViewVC logotype

Diff of /mga-gnome/trunk/mga-gnome

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3119 by ovitters, Tue Feb 28 12:37:23 2012 UTC revision 3120 by ovitters, Tue Feb 28 13:02:47 2012 UTC
# Line 40  import hashlib Line 40  import hashlib
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]+)')
# Line 495  def get_downstream_from_upstream(upstrea Line 498  def get_downstream_from_upstream(upstrea
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    
# Line 654  def cmd_parse_ftp_release_list(options, Line 657  def cmd_parse_ftp_release_list(options,
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    
# Line 709  def main(): Line 715  def main():
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      )      )

Legend:
Removed from v.3119  
changed lines
  Added in v.3120

  ViewVC Help
Powered by ViewVC 1.1.30