]> git.decadent.org.uk Git - dak.git/commitdiff
[JJ, r=JT] merge Joerg's outstanding changes.
authorJames Troup <james@nocrew.org>
Fri, 28 Dec 2007 22:09:30 +0000 (22:09 +0000)
committerJames Troup <james@nocrew.org>
Fri, 28 Dec 2007 22:09:30 +0000 (22:09 +0000)
ChangeLog
config/debian/apt.conf
config/debian/dak.conf
dak/generate_releases.py
dak/make_suite_file_list.py
dak/process_new.py
daklib/queue.py
daklib/utils.py

index ae0abe8af4b3889005d25a0ce32525b1f6168c05..069f674325ae0847090791d7dd102c2dea017dbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2007-12-28  Anthony Towns  <ajt@debian.org>
+
+       * daklib/utils.py (check_signature): add NOTATION_DATA and
+       NOTATION_NAME to known keywords.
+
+       * daklib/queue.py (Upload.check_source_against_db): 
+
+       * dak/make_suite_file_list.py: add -f/--force option.
+
+       * dak/generate_releases.py: add -a/--apt-conf=FILE and
+       -f/--force-touch options.  Pull version info from the database.
+       Make suite description optional.
+
+       * config/debian/dak.conf: update
+       Reject-Proposed-Updates::MoreInfoURL.  Comment out
+       Suite::Stable::Version and ::Description.
+
+       * config/debian/apt.conf: Add hurd-i386 to unstable
+       debian-installer stanza.
+
 2007-12-28  Joerg Jaspert  <joerg@debian.org>
 
        * KEYEXPIRED is actually a known keyword. We do check it earlier
index 626b021f578a60cdfb593c70cda15c1d74c5bf8f..aee3ab8561cef8f0dff49cad8e885b57e93d1a98 100644 (file)
@@ -145,7 +145,7 @@ tree "dists/unstable/main"
 {
    FileList "/srv/ftp.debian.org/database/dists/unstable_main_$(SECTION)_binary-$(ARCH).list";
    Sections "debian-installer";
-   Architectures "alpha amd64 arm hppa i386 ia64 mips mipsel m68k powerpc s390 sparc";
+   Architectures "alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel m68k powerpc s390 sparc";
    BinOverride "override.sid.main.$(SECTION)";
    SrcOverride "override.sid.main.src";
    BinCacheDB "packages-debian-installer-$(ARCH).db";
index b266d77bef804044c0bf59fdeefb5ae3415e7465..400f274af306c0f550ce5ba6faecd481c0699fc1 100644 (file)
@@ -137,7 +137,7 @@ Import-Archive
 Reject-Proposed-Updates
 {
    StableRejector "Andreas Barth and Martin Zobel-Helas";
-   MoreInfoURL "http://release.debian.org/stable/4.0/4.0r1/";
+   MoreInfoURL "http://release.debian.org/stable/4.0/4.0r3/";
 };
 
 Import-LDAP-Fingerprints
@@ -313,9 +313,9 @@ Suite
          sparc;
        };
        Announce "debian-changes@lists.debian.org";
-       Version "4.0r1";
+       // Version "4.0r1";
        Origin "Debian";
-       Description "Debian 4.0r1 Released 15 August 2007";
+       // Description "Debian 4.0r1 Released 15 August 2007";
        CodeName "etch";
        OverrideCodeName "etch";
        Priority "5";
index 0ae4aecf4e4b417c84567820fc70c8e8c2ad1564..213ad49bdf70b7183d8f361c506ddfaca8e9fbb8 100755 (executable)
@@ -22,7 +22,7 @@
 
 ################################################################################
 
-import sys, os, popen2, tempfile, stat, time
+import sys, os, popen2, tempfile, stat, time, pg
 import apt_pkg
 import daklib.utils
 
@@ -40,6 +40,8 @@ def usage (exit_code=0):
 Generate Release files (for SUITE).
 
   -h, --help                 show this help and exit
+  -a, --apt-conf FILE        use FILE instead of default apt.conf
+  -f, --force-touch          ignore Untouchable directives in dak.conf
 
 If no SUITE is given Release files are generated for all suites."""
 
@@ -129,8 +131,11 @@ def main ():
 
     Cnf = daklib.utils.get_conf()
 
-    Arguments = [('h',"help","Generate-Releases::Options::Help")]
-    for i in [ "help" ]:
+    Arguments = [('h',"help","Generate-Releases::Options::Help"),
+                ('a',"apt-conf","Generate-Releases::Options::Apt-Conf", "HasArg"),
+                ('f',"force-touch","Generate-Releases::Options::Force-Touch"),
+               ]
+    for i in [ "help", "apt-conf", "force-touch" ]:
        if not Cnf.has_key("Generate-Releases::Options::%s" % (i)):
            Cnf["Generate-Releases::Options::%s" % (i)] = ""
 
@@ -140,10 +145,13 @@ def main ():
     if Options["Help"]:
        usage()
 
+    if not Options["Apt-Conf"]:
+        Options["Apt-Conf"] = daklib.utils.which_apt_conf_file()
+
     AptCnf = apt_pkg.newConfiguration()
-    apt_pkg.ReadConfigFileISC(AptCnf,daklib.utils.which_apt_conf_file())
-    #apt_pkg.ReadConfigFileISC(AptCnf,"/org/ftp.debian.org/dak/config/debian/apt.conf.stable")
-    #apt_pkg.ReadConfigFileISC(AptCnf,"/org/ftp.debian.org/dak/config/debian/apt.conf.oldstable")
+    apt_pkg.ReadConfigFileISC(AptCnf, Options["Apt-Conf"])
+
+    projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
 
     if not suites:
         suites = Cnf.SubTree("Suite").List()
@@ -152,7 +160,7 @@ def main ():
         print "Processing: " + suite
        SuiteBlock = Cnf.SubTree("Suite::" + suite)
 
-       if SuiteBlock.has_key("Untouchable"):
+       if SuiteBlock.has_key("Untouchable") and not Options["Force-Touch"]:
             print "Skipping: " + suite + " (untouchable)"
             continue
 
@@ -160,9 +168,17 @@ def main ():
 
        origin = SuiteBlock["Origin"]
        label = SuiteBlock.get("Label", origin)
-       version = SuiteBlock.get("Version", "")
        codename = SuiteBlock.get("CodeName", "")
 
+       version = ""
+       description = ""
+
+       q = projectB.query("SELECT version, description FROM suite WHERE suite_name = '%s'" % (suite))
+       qs = q.getresult()
+       if len(qs) == 1:
+           if qs[0][0] != "-": version = qs[0][0]
+           if qs[0][1]: description = qs[0][1]
+
        if SuiteBlock.has_key("NotAutomatic"):
            notautomatic = "yes"
        else:
@@ -207,7 +223,8 @@ def main ():
        if components:
             out.write("Components: %s\n" % (" ".join(components)))
 
-       out.write("Description: %s\n" % (SuiteBlock["Description"]))
+       if description:
+           out.write("Description: %s\n" % (description))
 
        files = []
 
index 56810b29c7a8f8cdde950833e7d9b2aa441920d2..9836560d7e88940a5732c99cabc81484bf619784 100755 (executable)
@@ -59,6 +59,7 @@ Write out file lists suitable for use with apt-ftparchive.
 
   -a, --architecture=ARCH   only write file lists for this architecture
   -c, --component=COMPONENT only write file lists for this component
+  -f, --force               ignore Untouchable suite directives in dak.conf
   -h, --help                show this help and exit
   -n, --no-delete           don't delete older versions
   -s, --suite=SUITE         only write file lists for this suite
@@ -84,7 +85,7 @@ def delete_packages(delete_versions, pkg, dominant_arch, suite,
         delete_version = version[0]
         delete_id = packages[delete_unique_id]["id"]
         delete_arch = packages[delete_unique_id]["arch"]
-        if not Cnf.Find("Suite::%s::Untouchable" % (suite)):
+       if not Cnf.Find("Suite::%s::Untouchable" % (suite)) or Options["Force"]:
             if Options["No-Delete"]:
                 print "Would delete %s_%s_%s in %s in favour of %s_%s" % (pkg, delete_arch, delete_version, suite, dominant_version, dominant_arch)
             else:
@@ -413,8 +414,9 @@ def main():
                  ('c', "component", "Make-Suite-File-List::Options::Component", "HasArg"),
                  ('h', "help", "Make-Suite-File-List::Options::Help"),
                  ('n', "no-delete", "Make-Suite-File-List::Options::No-Delete"),
+                ('f', "force", "Make-Suite-File-List::Options::Force"),
                  ('s', "suite", "Make-Suite-File-List::Options::Suite", "HasArg")]
-    for i in ["architecture", "component", "help", "no-delete", "suite" ]:
+    for i in ["architecture", "component", "help", "no-delete", "suite", "force-touch" ]:
        if not Cnf.has_key("Make-Suite-File-List::Options::%s" % (i)):
            Cnf["Make-Suite-File-List::Options::%s" % (i)] = ""
     apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv)
index 8518398d37fc46f77fbc48fcdffd3ef89b22d694..b7010532e5c358141049efb22085936526f7e4d9 100755 (executable)
@@ -94,7 +94,7 @@ def recheck():
             (reject_msg, is_in_incoming) = Upload.check_dsc_against_db(file)
             reject(reject_msg)
 
-    if reject_message:
+    if reject_message.find("Rejected") != -1:
         answer = "XXX"
         if Options["No-Action"] or Options["Automatic"]:
             answer = 'S'
index d77f5f357796c000998bb47a63601586c331bbe3..f6bc3d4d104df702b8560d9bc2a19f4443074195 100644 (file)
@@ -831,7 +831,7 @@ SELECT s.version, su.suite_name FROM source s, src_associations sa, suite su
     # the .orig.tar.gz is a duplicate of the one in the archive]; if
     # you're iterating over 'files' and call this function as part of
     # the loop, be sure to add a check to the top of the loop to
-    # ensure you haven't just tried to derefernece the deleted entry.
+    # ensure you haven't just tried to dereference the deleted entry.
     # **WARNING**
 
     def check_dsc_against_db(self, file):
index a7a1085787c7f48c91ee66cae42858bf4cf0ffb9..2b40219c12bf0ff8823a4cb8d4ff13e1f3d9adc6 100755 (executable)
@@ -1060,7 +1060,7 @@ used."""
     # Finally ensure there's not something we don't recognise
     known_keywords = Dict(VALIDSIG="",SIG_ID="",GOODSIG="",BADSIG="",ERRSIG="",
                           SIGEXPIRED="",KEYREVOKED="",NO_PUBKEY="",BADARMOR="",
-                          NODATA="",KEYEXPIRED="")
+                          NODATA="",NOTATION_DATA="",NOTATION_NAME="",KEYEXPIRED="")
 
     for keyword in keywords.keys():
         if not known_keywords.has_key(keyword):