[dak/master 4/9] Kill unused OverrideType from the config file
Signed-off-by: Mark Hymers <mhy@debian.org>
---
config/backports/dak.conf | 7 -------
config/debian-security/dak.conf | 7 -------
config/debian/dak.conf | 7 -------
dak/check_overrides.py | 9 ++++++---
dak/make_overrides.py | 20 +++++++++-----------
docs/README.config | 16 ----------------
6 files changed, 15 insertions(+), 51 deletions(-)
diff --git a/config/backports/dak.conf b/config/backports/dak.conf
index 7f64bb4..c1ff529 100644
--- a/config/backports/dak.conf
+++ b/config/backports/dak.conf
@@ -381,13 +381,6 @@ Priority
source 0; // i.e. unused
};
-OverrideType
-{
- deb;
- udeb;
- dsc;
-};
-
Location
{
// Pool locations on backports.debian.org
diff --git a/config/debian-security/dak.conf b/config/debian-security/dak.conf
index 5f09abf..db3c647 100644
--- a/config/debian-security/dak.conf
+++ b/config/debian-security/dak.conf
@@ -403,13 +403,6 @@ Priority
source 0; // i.e. unused
};
-OverrideType
-{
- deb;
- udeb;
- dsc;
-};
-
Location
{
/srv/security-master.debian.org/ftp/pool/
diff --git a/config/debian/dak.conf b/config/debian/dak.conf
index f5424dc..bdbdf2c 100644
--- a/config/debian/dak.conf
+++ b/config/debian/dak.conf
@@ -404,13 +404,6 @@ Component
};
};
-OverrideType
-{
- deb;
- udeb;
- dsc;
-};
-
Urgency
{
Default "low";
diff --git a/dak/check_overrides.py b/dak/check_overrides.py
index a8e0f1d..523cdef 100755
--- a/dak/check_overrides.py
+++ b/dak/check_overrides.py
@@ -372,9 +372,12 @@ def main ():
for component in cnf.SubTree("Component").List():
# It is crucial for the dsc override creation based on binary
# overrides that 'dsc' goes first
- otypes = cnf.ValueList("OverrideType")
- otypes.remove("dsc")
- otypes = ["dsc"] + otypes
+ otypes = ['dsc']
+ for ot in session.query(OverrideType):
+ if ot.overridetype == 'dsc':
+ continue
+ otypes.append(ot.overridetype)
+
for otype in otypes:
print "Processing %s [%s - %s]" \
% (osuite, component, otype)
diff --git a/dak/make_overrides.py b/dak/make_overrides.py
index b925d92..716b085 100755
--- a/dak/make_overrides.py
+++ b/dak/make_overrides.py
@@ -122,26 +122,24 @@ def main ():
sys.stderr.write("Processing %s...\n" % (suite.suite_name))
override_suite = suite.overridecodename
- for component_name in cnf.SubTree("Component").List():
- component = get_component(component_name, session)
- if not component:
- utils.fubar('Component %s not found' % component_name)
-
- for otype_name in cnf.ValueList("OverrideType"):
- otype = get_override_type(otype_name, session)
- if not otype:
- utils.fubar('OverrideType %s not found' % otype_name)
+ for component in session.query(Component).all():
+ for otype in session.query(OverrideType).all():
+ otype_name = otype.overridetype
+ cname = component.component_name
+ # TODO: Stick suffix info in database (or get rid of it)
if otype_name == "deb":
suffix = ""
elif otype_name == "udeb":
- if component == "contrib":
+ if cname == "contrib":
continue # Ick2
suffix = ".debian-installer"
elif otype_name == "dsc":
suffix = ".src"
+ else:
+ utils.fubar("Don't understand OverrideType %s" % otype.overridetype)
- cname = component.component_name.replace('/', '_')
+ cname = cname.replace('/', '_')
filename = os.path.join(cnf["Dir::Override"], "override.%s.%s%s" % (override_suite, cname, suffix))
output_file = utils.open_file(filename, 'w')
diff --git a/docs/README.config b/docs/README.config
index 30682fb..261ce0c 100644
--- a/docs/README.config
+++ b/docs/README.config
@@ -385,22 +385,6 @@ go into the SQL database's 'priority' table.
================================================================================
-OverrideType
-------------
-
-Mandatory. List of al valid override types, e.g.
-
-| OverrideType
-| {
-| deb;
-| dsc;
-| udeb;
-| };
-
-The type goes into the 'override_type' table in the SQL database.
-
-================================================================================
-
Location
--------
--
1.7.2.5
Reply to: