cnf = Config()
- suite_suffix = "%s" % (cnf.Find("Dinstall::SuiteSuffix"))
+ suite_suffix = cnf.find("Dinstall::SuiteSuffix", "")
- outfile = os.path.join(cnf["Dir::Root"], 'dists', "%s/%s" % (suite.suite_name, suite_suffix), "Release")
+ outfile = os.path.join(suite.archive.path, 'dists', suite.suite_name, suite_suffix, "Release")
out = open(outfile + ".new", "w")
for key, dbfield in attribs:
if getattr(suite, dbfield) is not None:
- out.write("%s: %s\n" % (key, getattr(suite, dbfield)))
+ # TEMPORARY HACK HACK HACK until we change the way we store the suite names etc
+ if key == 'Suite' and getattr(suite, dbfield) == 'squeeze-updates':
+ out.write("Suite: stable-updates\n")
+ else:
+ out.write("%s: %s\n" % (key, getattr(suite, dbfield)))
out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))
out.write("Description: %s\n" % suite.description)
for comp in components:
- for dirpath, dirnames, filenames in os.walk("%sdists/%s/%s%s" % (cnf["Dir::Root"], suite.suite_name, suite_suffix, comp), topdown=True):
+ for dirpath, dirnames, filenames in os.walk(os.path.join(suite.archive.path, "dists", suite.suite_name, suite_suffix, comp), topdown=True):
if not re_gensubrelease.match(dirpath):
continue
# their checksums to the main Release file
oldcwd = os.getcwd()
- os.chdir("%sdists/%s/%s" % (cnf["Dir::Root"], suite.suite_name, suite_suffix))
+ os.chdir(os.path.join(suite.archive.path, "dists", suite.suite_name, suite_suffix))
hashfuncs = { 'MD5Sum' : apt_pkg.md5sum,
'SHA1' : apt_pkg.sha1sum,
Arguments = [('h',"help","Generate-Releases::Options::Help"),
('s',"suite","Generate-Releases::Options::Suite"),
- ('f',"force","Generate-Releases::Options::Force")]
+ ('f',"force","Generate-Releases::Options::Force"),
+ ('o','option','','ArbItem')]
- suite_names = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv)
- Options = cnf.SubTree("Generate-Releases::Options")
+ suite_names = apt_pkg.parse_commandline(cnf.Cnf, Arguments, sys.argv)
+ Options = cnf.subtree("Generate-Releases::Options")
if Options["Help"]:
usage()
- Logger = daklog.Logger(cnf, 'generate-releases')
+ Logger = daklog.Logger('generate-releases')
session = DBConn().session()