7
def get_apt_cache(distroseries):
8
ARCHIVE_ROOT = "http://archive.ubuntu.com/ubuntu"
9
rootdir="./aptroot.%s" % distroseries
10
sources_list_dir = os.path.join(rootdir, "etc","apt")
11
if not os.path.exists(sources_list_dir):
12
os.makedirs(sources_list_dir)
13
sources_list = open(os.path.join(sources_list_dir, "sources.list"),"w")
16
"%s-updates" % distroseries,
17
"%s-security" % distroseries]:
19
"deb %s %s main restricted universe\n" % (
20
ARCHIVE_ROOT, pocket))
22
cache = apt.Cache(rootdir=rootdir)
23
cache.update(apt.progress.FetchProgress())
27
if __name__ == "__main__":
28
pkgs_with_support_information = set()
31
print "need a support status override file as argument"
37
pkgname=line.split("/")[0]
38
pkgs_with_support_information.add(pkgname)
40
cache = get_apt_cache(distroseries = "lucid")
42
if not pkg.candidate or not pkg.candidate.downloadable:
44
if "/" in pkg.section:
45
if pkg in pkgs_with_support_information:
46
print "%s in support information but section %s" % (pkg, pkg.section)
48
if not pkg.name in pkgs_with_support_information:
49
print "not in support information %s" % pkg.name