# Create all the Release files
# Copyright (C) 2001, 2002 Anthony Towns <ajt@debian.org>
# Create all the Release files
# Copyright (C) 2001, 2002 Anthony Towns <ajt@debian.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-import sys, os, popen2, tempfile, stat, string, time
+import sys, os, popen2, tempfile, stat, time
def compressnames (tree,type,file):
compress = AptCnf.get("%s::%s::Compress" % (tree,type), AptCnf.get("Default::%s::Compress" % (type), ". gzip"))
result = []
def compressnames (tree,type,file):
compress = AptCnf.get("%s::%s::Compress" % (tree,type), AptCnf.get("Default::%s::Compress" % (type), ". gzip"))
result = []
(cat, ext, name) = (name[1:j], name[j+1:k], name[k+1:])
(size, file_handle) = create_temp_file("%s %s%s%s" %
(cat, path, name, ext))
(cat, ext, name) = (name[1:j], name[j+1:k], name[k+1:])
(size, file_handle) = create_temp_file("%s %s%s%s" %
(cat, path, name, ext))
origin = SuiteBlock["Origin"]
label = SuiteBlock.get("Label", origin)
origin = SuiteBlock["Origin"]
label = SuiteBlock.get("Label", origin)
out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))
if notautomatic != "":
out.write("NotAutomatic: %s\n" % (notautomatic))
out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))
if notautomatic != "":
out.write("NotAutomatic: %s\n" % (notautomatic))
- for sec in string.split(AptCnf["tree::%s::Sections" % (tree)]):
- for arch in string.split(AptCnf["tree::%s::Architectures" % (tree)]):
+ for sec in AptCnf["tree::%s::Sections" % (tree)].split():
+ for arch in AptCnf["tree::%s::Architectures" % (tree)].split():
if arch == "source":
for file in compressnames("tree::%s" % (tree), "Sources", "%s/%s/Sources" % (sec, arch)):
files.append(file)
if arch == "source":
for file in compressnames("tree::%s" % (tree), "Sources", "%s/%s/Sources" % (sec, arch)):
files.append(file)
- #release = open(string.replace(longsuite,"/","_") + "_" + arch + "_" + sec + "_Release", "w")
+ #release = open(longsuite.replace("/","_") + "_" + arch + "_" + sec + "_Release", "w")
if arch != "source": # always true
for file in compressnames("tree::%s/main" % (tree), "Packages", "main/%s/binary-%s/Packages" % (sec, arch)):
files.append(file)
elif AptCnf.has_key("bindirectory::%s" % (tree)):
for file in compressnames("bindirectory::%s" % (tree), "Packages", AptCnf["bindirectory::%s::Packages" % (tree)]):
if arch != "source": # always true
for file in compressnames("tree::%s/main" % (tree), "Packages", "main/%s/binary-%s/Packages" % (sec, arch)):
files.append(file)
elif AptCnf.has_key("bindirectory::%s" % (tree)):
for file in compressnames("bindirectory::%s" % (tree), "Packages", AptCnf["bindirectory::%s::Packages" % (tree)]):
for file in compressnames("bindirectory::%s" % (tree), "Sources", AptCnf["bindirectory::%s::Sources" % (tree)]):
for file in compressnames("bindirectory::%s" % (tree), "Sources", AptCnf["bindirectory::%s::Sources" % (tree)]):
if Cnf.has_key("Dinstall::SigningKeyring"):
keyring = "--secret-keyring \"%s\"" % Cnf["Dinstall::SigningKeyring"]
if Cnf.has_key("Dinstall::SigningPubKeyring"):
if Cnf.has_key("Dinstall::SigningKeyring"):
keyring = "--secret-keyring \"%s\"" % Cnf["Dinstall::SigningKeyring"]
if Cnf.has_key("Dinstall::SigningPubKeyring"):