~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to utils/demotions.py

  • Committer: Michael Vogt
  • Date: 2006-10-05 14:36:09 UTC
  • mfrom: (358.1.118 main)
  • mto: This revision was merged to the branch mainline in revision 376.
  • Revision ID: michael.vogt@ubuntu.com-20061005143609-d3d486671aba63d3
* merged from mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
  except OSError:
44
44
    pass
45
45
 
46
 
  breezy = Dist("breezy")
47
 
  dapper = Dist("dapper")
 
46
  old = Dist("dapper")
 
47
  new = Dist("edgy")
48
48
  
49
49
  # go over the dists to find main pkgs
50
 
  for dist in [breezy, dapper]:
 
50
  for dist in [old, new]:
51
51
    
52
52
    for comp in ["main", "restricted", "universe", "multiverse"]:
53
53
      line = "deb http://archive.ubuntu.com/ubuntu %s %s\n" % (dist.name,comp)
64
64
        map(lambda pkg: dist.pkgs_in_comp[comp].add(pkg.name), cache)
65
65
 
66
66
  # check what is no longer in main
67
 
  no_longer_main = breezy.pkgs_in_comp["main"] - dapper.pkgs_in_comp["main"]
68
 
  no_longer_main |= breezy.pkgs_in_comp["restricted"] - dapper.pkgs_in_comp["restricted"]
 
67
  no_longer_main = old.pkgs_in_comp["main"] - new.pkgs_in_comp["main"]
 
68
  no_longer_main |= old.pkgs_in_comp["restricted"] - new.pkgs_in_comp["restricted"]
69
69
 
70
70
  # check what moved to universe and what was removed (or renamed)
71
 
  in_universe = lambda pkg: pkg in dapper.pkgs_in_comp["universe"] or pkg in dapper.pkgs_in_comp["multiverse"]
 
71
  in_universe = lambda pkg: pkg in new.pkgs_in_comp["universe"] or pkg in new.pkgs_in_comp["multiverse"]
72
72
 
73
73
  # debug
74
74
  #not_in_universe = lambda pkg: not in_universe(pkg)
82
82
  print "writing the demotion info to '%s'" % outfile
83
83
  # write it out
84
84
  out = open(outfile,"w")
85
 
  out.write("# demoted packages in dapper\n")
 
85
  out.write("# demoted packages\n")
86
86
  out.write("\n".join(demoted))