]> err.no Git - dak/commitdiff
Get rid of overridesuite and validtime in dak.conf
authorJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 15:21:41 +0000 (17:21 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 15:21:41 +0000 (17:21 +0200)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian/dak.conf
dak/generate_releases.py
daklib/queue.py

index 0d094c93b9775f5454ec2ba220a8defae496d2df..c798617d4068bcd21dacec097d0a9071f1bb0d30 100644 (file)
@@ -205,8 +205,6 @@ Suite
          contrib;
          non-free;
        };
-       OverrideSuite "stable";
-       ValidTime 604800; // 7 days
        VersionChecks
        {
          MustBeNewerThan
@@ -235,7 +233,6 @@ Suite
          contrib;
          non-free;
        };
-       ValidTime 604800; // 7 days
   };
 
   Testing-Proposed-Updates
@@ -246,8 +243,6 @@ Suite
          contrib;
          non-free;
        };
-       OverrideSuite "testing";
-       ValidTime 604800; // 7 days
        VersionChecks
        {
          MustBeNewerThan
@@ -277,8 +272,6 @@ Suite
          contrib;
          non-free;
        };
-       OverrideSuite "testing";
-       ValidTime 604800; // 7 days
        VersionChecks
        {
          MustBeNewerThan
@@ -302,7 +295,6 @@ Suite
          contrib;
          non-free;
        };
-       ValidTime 604800; // 7 days
        VersionChecks
        {
          MustBeNewerThan
@@ -324,8 +316,6 @@ Suite
          contrib;
          non-free;
        };
-       OverrideSuite "unstable";
-       ValidTime 604800; // 7 days
        VersionChecks
        {
          MustBeNewerThan
index 31cae490775dafcf10bcbd9e8967a6f0ab94089f..04627fc458ffc78d36e1f53de3ab684945ea2b4c 100755 (executable)
@@ -227,7 +227,7 @@ def main ():
 
         architectures = get_suite_architectures(suite, skipall=True, skipsrc=True)
 
-        if SuiteBlock.has_key("NotAutomatic"):
+        if suiteobj.notautomatic:
             notautomatic = "yes"
         else:
             notautomatic = ""
@@ -266,8 +266,8 @@ def main ():
             out.write("Codename: %s\n" % (codename))
         out.write("Date: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()))))
 
-        if SuiteBlock.has_key("ValidTime"):
-            validtime=float(SuiteBlock["ValidTime"])
+        if suiteobj.validtime:
+            validtime=float(suiteobj.validtime)
             out.write("Valid-Until: %s\n" % (time.strftime("%a, %d %b %Y %H:%M:%S UTC", time.gmtime(time.time()+validtime))))
 
         if notautomatic != "":
index e3874b620583f9c293de9ab7c22e136a0c954333..305d4838f985990137eb41c8c8ece58cca90e80d 100755 (executable)
@@ -162,18 +162,22 @@ def determine_new(filename, changes, files, warn=1, session = None):
     # Fix up the list of target suites
     cnf = Config()
     for suite in changes["suite"].keys():
-        override = cnf.Find("Suite::%s::OverrideSuite" % (suite))
-        if override:
-            (olderr, newerr) = (get_suite(suite, session) == None,
-                                get_suite(override, session) == None)
-            if olderr or newerr:
-                (oinv, newinv) = ("", "")
-                if olderr: oinv = "invalid "
-                if newerr: ninv = "invalid "
-                print "warning: overriding %ssuite %s to %ssuite %s" % (
-                        oinv, suite, ninv, override)
-            del changes["suite"][suite]
-            changes["suite"][override] = 1
+        oldsuite = get_suite(suite, session)
+        if not oldsuite:
+            print "WARNING: Invalid suite %s found" % suite
+            continue
+
+        if oldsuite.overridesuite:
+            newsuite = get_suite(oldsuite.overridesuite, session)
+
+            if newsuite:
+                print "WARNING: overriding suite %s to suite %s" % (
+                    suite, oldsuite.overridesuite)
+                del changes["suite"][suite]
+                changes["suite"][oldsuite.overridesuite] = 1
+            else:
+                print "WARNING: Told to use overridesuite %s for %s but it doesn't exist.  Bugger" % (
+                    oldsuite.overridesuite, suite)
 
     # Check for unprocessed byhand files
     if dbchg is not None:
@@ -2361,8 +2365,9 @@ distribution."""
             file_type = binary_type
 
         # Override suite name; used for example with proposed-updates
-        if cnf.Find("Suite::%s::OverrideSuite" % (suite)) != "":
-            suite = cnf["Suite::%s::OverrideSuite" % (suite)]
+        oldsuite = get_suite(suite, session)
+        if oldsuite.overridesuite:
+            suite = oldsuite.overridesuite
 
         result = get_override(package, suite, component, file_type, session)