#!/usr/bin/env python
-# Create all the Release files
+""" Create all the Release files """
# Copyright (C) 2001, 2002, 2006 Anthony Towns <ajt@debian.org>
import gzip, bz2
import apt_pkg
from daklib import utils
+from daklib import database
from daklib.dak_exceptions import *
################################################################################
apt_pkg.ReadConfigFileISC(AptCnf, Options["Apt-Conf"])
projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
+ database.init(Cnf, projectB)
if not suites:
suites = Cnf.SubTree("Suite").List()
if qs[0][0] != "-": version = qs[0][0]
if qs[0][1]: description = qs[0][1]
+ architectures = database.get_suite_architectures(suite)
+ if architectures == None:
+ architectures = []
+
if SuiteBlock.has_key("NotAutomatic"):
notautomatic = "yes"
else:
if notautomatic != "":
out.write("NotAutomatic: %s\n" % (notautomatic))
- out.write("Architectures: %s\n" % (" ".join(filter(utils.real_arch, SuiteBlock.ValueList("Architectures")))))
+ out.write("Architectures: %s\n" % (" ".join(filter(utils.real_arch, architectures))))
if components:
out.write("Components: %s\n" % (" ".join(components)))
files = []
if AptCnf.has_key("tree::%s" % (tree)):
+ if AptCnf.has_key("tree::%s::Contents" % (tree)):
+ pass
+ else:
+ for x in os.listdir("%s/%s" % (Cnf["Dir::Root"], tree)):
+ if x.startswith('Contents-'):
+ files.append(x)
+
for sec in AptCnf["tree::%s::Sections" % (tree)].split():
for arch in AptCnf["tree::%s::Architectures" % (tree)].split():
if arch == "source":