@contact: Debian FTPMaster <ftpmaster@debian.org>
@Copyright: 2001, 2002, 2006 Anthony Towns <ajt@debian.org>
-@copyright: 2009 Joerg Jaspert <joerg@debian.org>
+@copyright: 2009, 2011 Joerg Jaspert <joerg@debian.org>
@license: GNU General Public License version 2 or later
"""
# This program is free software; you can redistribute it and/or modify
def print_sha256_files (tree, files):
print_md5sha_files (tree, files, apt_pkg.sha256sum)
-def write_release_file (relpath, suite, component, origin, label, arch, version="", suite_suffix="", notautomatic=""):
+def write_release_file (relpath, suite, component, origin, label, arch, version="", suite_suffix="", notautomatic="", butautomaticupgrades=""):
try:
if os.access(relpath, os.F_OK):
if os.stat(relpath).st_nlink > 1:
release.write("Label: %s\n" % (label))
if notautomatic != "":
release.write("NotAutomatic: %s\n" % (notautomatic))
+ if butautomaticupgrades != "":
+ release.write("ButAutomaticUpgrades: %s\n" % (butautomaticupgrades))
release.write("Architecture: %s\n" % (arch))
release.close()
else:
notautomatic = ""
+ if suiteobj.butautomaticupgrades:
+ butautomaticupgrades = "yes"
+ else:
+ butautomaticupgrades = ""
+
if SuiteBlock.has_key("Components"):
components = SuiteBlock.ValueList("Components")
else:
if notautomatic != "":
out.write("NotAutomatic: %s\n" % (notautomatic))
+ if butautomaticupgrades != "":
+ out.write("ButAutomaticUpgrades: %s\n" % (butautomaticupgrades))
out.write("Architectures: %s\n" % (" ".join([a.arch_string for a in architectures])))
if components:
out.write("Components: %s\n" % (" ".join(components)))
files.append(cfile)
add_tiffani(files, Cnf["Dir::Root"] + tree, filepath)
else:
- disks = "%s/disks-%s" % (sec, arch)
- diskspath = Cnf["Dir::Root"]+tree+"/"+disks
- if os.path.exists(diskspath):
- for dir in os.listdir(diskspath):
- if os.path.exists("%s/%s/md5sum.txt" % (diskspath, dir)):
- files.append("%s/%s/md5sum.txt" % (disks, dir))
+ installer = "%s/installer-%s" % (sec, arch)
+ installerpath = Cnf["Dir::Root"]+tree+"/"+installer
+ if os.path.exists(installerpath):
+ for directory in os.listdir(installerpath):
+ if os.path.exists("%s/%s/images/MD5SUMS" % (installerpath, directory)):
+ files.append("%s/%s/images/MD5SUMS" % (installer, directory))
filepath = "%s/binary-%s/Packages" % (sec, arch)
for cfile in compressnames("tree::%s" % (tree), "Packages", filepath):
else:
rel = "%s/binary-%s/Release" % (sec, arch)
relpath = Cnf["Dir::Root"]+tree+"/"+rel
- write_release_file(relpath, suite, sec, origin, label, arch, version, suite_suffix, notautomatic)
+ write_release_file(relpath, suite, sec, origin, label, arch, version, suite_suffix, notautomatic, butautomaticupgrades)
files.append(rel)
gen_i18n_index(files, tree, sec)
if arch != "source": # always true
rel = "%s/%s/binary-%s/Release" % (dis, sec, arch)
relpath = Cnf["Dir::Root"]+tree+"/"+rel
- write_release_file(relpath, suite, dis, origin, label, arch, version, suite_suffix, notautomatic)
+ write_release_file(relpath, suite, dis, origin, label, arch, version, suite_suffix, notautomatic, butautomaticupgrades)
files.append(rel)
for cfile in compressnames("tree::%s/%s" % (tree,dis),
"Packages",