/[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 3501 by ovitters, Thu Mar 15 14:02:03 2012 UTC revision 3502 by ovitters, Thu Mar 15 14:08:26 2012 UTC
# Line 522  def write_file(path, data): Line 522  def write_file(path, data):
522  def cmd_co(options, parser):  def cmd_co(options, parser):
523      root = os.path.expanduser(PKGROOT)      root = os.path.expanduser(PKGROOT)
524    
525      for package, module, package_version, spec_version in sorted(join_streams()):      for package, module, package_version, spec_version, downstream_files in sorted(join_streams()):
526          print "%s => %s" % (module, package)          print "%s => %s" % (module, package)
527          subprocess.call(['mgarepo', 'co', package], cwd=root)          subprocess.call(['mgarepo', 'co', package], cwd=root)
528    
# Line 547  def join_streams(show_version=False, onl Line 547  def join_streams(show_version=False, onl
547              if only_diff_version and package_version == spec_version:              if only_diff_version and package_version == spec_version:
548                  continue                  continue
549    
550              yield (package, module, package_version, spec_version)              yield (package, module, package_version, spec_version, downstream_files[package])
551    
552  def cmd_ls(options, parser):  def cmd_ls(options, parser):
553      for package, module, package_version, spec_version in sorted(join_streams(show_version=options.show_version, only_diff_version=options.diff)):      for package, module, package_version, spec_version, downstream_files in sorted(join_streams(show_version=options.show_version, only_diff_version=options.diff)):
554          print package,"\t",          print package,"\t",
555          if options.upstream: print module, "\t",          if options.upstream: print module, "\t",
556          if options.show_version: print spec_version, "\t", package_version, "\t",          if options.show_version: print spec_version, "\t", package_version, "\t",
557          print          print
558    
559  def cmd_patches(options, parser):  def cmd_patches(options, parser):
560      upstream = get_upstream_names()      root = os.path.expanduser(PKGROOT)
     downstream, downstream_files = get_downstream_names()  
   
     path = os.path.expanduser(PKGROOT)  
   
     import pprint  
561    
562      matches = upstream & set(downstream.keys())      for package, module, package_version, spec_version, downstream_files in sorted(join_streams()):
563      for module in sorted(matches):          for filename in downstream_files:
564          for srpm in downstream[module].keys():              if '.patch' in filename or '.diff' in filename:
565              for filename in downstream_files[srpm]:  
566                  if '.patch' in filename or '.diff' in filename:                  p = Patch(os.path.join(root, package, "SOURCES", filename), show_path=options.path)
567                    valid = ""
568                      p = Patch(os.path.join(path, srpm, "SOURCES", filename), show_path=options.path)                  forwarded = ""
569                      valid = ""                  if p.dep3['headers']:
570                      forwarded = ""                      forwarded = p.dep3['headers'].get('Forwarded', "no")
571                      if p.dep3['headers']:                      if p.dep3['valid']:
572                          forwarded = p.dep3['headers'].get('Forwarded', "no")                          valid="VALID"
573                          if p.dep3['valid']:                  print "\t".join((module, package, str(p), forwarded, valid))
                             valid="VALID"  
                     print "\t".join((module, srpm, str(p), forwarded, valid))  
574    
575  def cmd_dep3(options, parser):  def cmd_dep3(options, parser):
576      p = Patch(options.patch)      p = Patch(options.patch)

Legend:
Removed from v.3501  
changed lines
  Added in v.3502

  ViewVC Help
Powered by ViewVC 1.1.30