From: Mark Hymers Date: Wed, 27 Jul 2011 08:40:11 +0000 (+0100) Subject: Kill unused OverrideType from the config file X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f44698379afcac66997806e421a216de8ad40a31;p=dak Kill unused OverrideType from the config file Signed-off-by: Mark Hymers --- diff --git a/config/backports/dak.conf b/config/backports/dak.conf index 7f64bb46..c1ff5293 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 5f09abf2..db3c6470 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 f5424dcc..bdbdf2c0 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 a8e0f1d9..523cdefe 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 b925d927..716b085b 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 30682fb8..261ce0c4 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 --------