3
# FIXME: strip "TryExec" from the extracted menu files (and noDisplay)
6
# - emacs21 ships it's icon in emacs-data, deal with this
7
# - some stuff needs to be blacklisted (e.g. gnome-about)
8
# - lots of packages have there desktop file in "-data", "-comon" (e.g. anjuta)
9
# - lots of packages have multiple desktop files for the same application
10
# abiword, abiword-gnome, abiword-gtk
29
# pkgs in main for the given dist
31
def __init__(self,name):
33
self.pkgs_in_comp = {}
35
if __name__ == "__main__":
38
apt_pkg.Config.Set("Dir::state","./apt/")
39
apt_pkg.Config.Set("Dir::Etc","./apt")
41
os.makedirs("apt/lists/partial")
45
breezy = Dist("breezy")
46
dapper = Dist("dapper")
48
# go over the dists to find main pkgs
49
for dist in [breezy, dapper]:
51
for comp in ["main", "restricted", "universe", "multiverse"]:
52
line = "deb http://archive.ubuntu.com/ubuntu %s %s\n" % (dist.name,comp)
53
file("apt/sources.list","w").write(line)
54
dist.pkgs_in_comp[comp] = set()
57
for arch in ["i386","amd64", "powerpc"]:
58
apt_pkg.Config.Set("APT::Architecture",arch)
59
cache = apt.Cache(apt.progress.OpTextProgress())
60
prog = apt.progress.TextFetchProgress()
62
cache.open(apt.progress.OpTextProgress())
63
map(lambda pkg: dist.pkgs_in_comp[comp].add(pkg.name), cache)
65
# check what is no longer in main
66
no_longer_main = breezy.pkgs_in_comp["main"] - dapper.pkgs_in_comp["main"]
67
no_longer_main |= breezy.pkgs_in_comp["restricted"] - dapper.pkgs_in_comp["restricted"]
69
# check what moved to universe and what was removed (or renamed)
70
in_universe = lambda pkg: pkg in dapper.pkgs_in_comp["universe"] or pkg in dapper.pkgs_in_comp["multiverse"]
73
#not_in_universe = lambda pkg: not in_universe(pkg)
74
#print filter(not_in_universe, no_longer_main)
76
# this stuff was demoted and is no in universe
77
demoted = filter(in_universe, no_longer_main)
80
outfile = "demoted.cfg"
81
print "writing the demotion info to '%s'" % outfile
83
out = open(outfile,"w")
84
out.write("# demoted packages in dapper\n")
85
out.write("\n".join(demoted))