]> err.no Git - dak/commitdiff
Kill unused OverrideType from the config file
authorMark Hymers <mhy@debian.org>
Wed, 27 Jul 2011 08:40:11 +0000 (09:40 +0100)
committerMark Hymers <mhy@debian.org>
Wed, 27 Jul 2011 08:40:11 +0000 (09:40 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
config/backports/dak.conf
config/debian-security/dak.conf
config/debian/dak.conf
dak/check_overrides.py
dak/make_overrides.py
docs/README.config

index 7f64bb46fe47a0768a95957940675cfd802c1e6b..c1ff5293cd6ee207eedbba7017d8b4e13f47840a 100644 (file)
@@ -381,13 +381,6 @@ Priority
   source 0; // i.e. unused
 };
 
-OverrideType
-{
-  deb;
-  udeb;
-  dsc;
-};
-
 Location
 {
   // Pool locations on backports.debian.org
index 5f09abf2a84c643fa9d7e9dba7976b468a37f127..db3c64701585c8642b710fd982324542fc0ef5a1 100644 (file)
@@ -403,13 +403,6 @@ Priority
   source 0; // i.e. unused
 };
 
-OverrideType
-{
-  deb;
-  udeb;
-  dsc;
-};
-
 Location
 {
   /srv/security-master.debian.org/ftp/pool/
index f5424dcca280d65b0b0cc83c86b6a56fff9251bb..bdbdf2c08f1472fe4acddad4de422519febea8c0 100644 (file)
@@ -404,13 +404,6 @@ Component
   };
 };
 
-OverrideType
-{
-  deb;
-  udeb;
-  dsc;
-};
-
 Urgency
 {
   Default "low";
index a8e0f1d9eb6a172a4d1fa1629fd3690b8f6e57ed..523cdefe52f4e85dfd62369d4cd4066fffdf132b 100755 (executable)
@@ -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)
index b925d927c294108d3998bb7abcc9703abb307587..716b085bdf488f975c541113c70013235b0a67b4 100755 (executable)
@@ -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')
index 30682fb84f8afd3eadfc82a035cefac79f99b69f..261ce0c4f1be436ed6571bed9fb513578577676f 100644 (file)
@@ -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
 --------