]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote branch 'tolimar/rm-close-bugs' into merge
authorJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 13:44:11 +0000 (15:44 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 13:44:11 +0000 (15:44 +0200)
* tolimar/rm-close-bugs:
  Fix key error if do-close isn't set
  Add some debugging output

Signed-off-by: Joerg Jaspert <joerg@debian.org>
15 files changed:
config/backports/dak.conf
config/backports/dinstall.functions
config/debian/apt.conf
config/debian/dak.conf
config/debian/dinstall.functions
dak/check_overrides.py
dak/generate_packages_sources.py
dak/init_db.py [deleted file]
dak/make_maintainers.py
dak/make_overrides.py
dak/stats.py
daklib/queue.py
scripts/debian/import_dataset.sh [new file with mode: 0755]
scripts/debian/import_testing.sh [deleted file]
templates/rm.bug-close

index eaa89c2737608bd688ce6eb60115b69f12363a5f..993cb80da76c9cad76b254afefdf9ee0313abcb0 100644 (file)
@@ -188,14 +188,6 @@ Suite
          contrib;
          non-free;
        };
-
-       Announce "debian-backports-changes@lists.debian.org";
-       Origin "Debian Backports";
-       Description "Backports for the Lenny Distribution";
-       CodeName "lenny-backports";
-       OverrideCodeName "lenny-backports";
-       Priority "7";
-       NotAutomatic "yes";
   };
 
 
@@ -207,14 +199,6 @@ Suite
          contrib;
          non-free;
        };
-
-       Announce "debian-backports-changes@lists.debian.org";
-       Origin "Debian Backports";
-       Description "Backports for the Squeeze Distribution";
-       CodeName "squeeze-backports";
-       OverrideCodeName "squeeze-backports";
-       Priority "7";
-       NotAutomatic "yes";
   };
 
 };
index 2757a1792752fdb1e19dad27b4758a2124c6d0fe..a19487f688561f4fd4bf17f351991b1d62004542 100644 (file)
@@ -612,4 +612,5 @@ function changelogs() {
     mkdir -p ${exportpublic}/changelogs
     cd ${exportpublic}/changelogs
     rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
+    sudo -H -u archvsync /home/archvsync/runmirrors metabdo > ~dak/runmirrors-metadata.log 2>&1 &
 }
index 733e6025bc50a25a564714fa6efa150147f1a6b7..9822577a277664c4d1f2f4d108cf3e04578efc95 100644 (file)
@@ -44,30 +44,6 @@ tree "dists/proposed-updates"
    Contents " ";
 };
 
-tree "/srv/ftp-master.debian.org/ftp-testing/dists/lenny-volatile"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/lenny-volatile_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/lenny-volatile_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc source";
-   BinOverride "override.lenny.$(SECTION)";
-   ExtraOverride "override.lenny.extra.$(SECTION)";
-   SrcOverride "override.lenny.$(SECTION).src";
-   Contents " ";
-};
-
-tree "/srv/ftp-master.debian.org/ftp-testing/dists/lenny-volatile-proposed-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/lenny-volatile-proposed-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/lenny-volatile-proposed-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc s390 sparc source";
-   BinOverride "override.lenny.$(SECTION)";
-   ExtraOverride "override.lenny.extra.$(SECTION)";
-   SrcOverride "override.lenny.$(SECTION).src";
-   Contents " ";
-};
-
 tree "dists/testing"
 {
    FakeDI "dists/unstable";
@@ -92,7 +68,7 @@ tree "dists/testing-proposed-updates"
    Contents " ";
 };
 
-tree "/srv/ftp-master.debian.org/ftp-testing/dists/squeeze-volatile"
+tree "dists/squeeze-volatile"
 {
    FileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile_$(SECTION)_binary-$(ARCH).list";
    SourceFileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile_$(SECTION)_source.list";
@@ -104,18 +80,6 @@ tree "/srv/ftp-master.debian.org/ftp-testing/dists/squeeze-volatile"
    Contents " ";
 };
 
-tree "/srv/ftp-master.debian.org/ftp-testing/dists/squeeze-volatile-proposed-updates"
-{
-   FileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile-proposed-updates_$(SECTION)_binary-$(ARCH).list";
-   SourceFileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile-proposed-updates_$(SECTION)_source.list";
-   Sections "main contrib non-free";
-   Architectures "amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc kfreebsd-i386 kfreebsd-amd64 source";
-   BinOverride "override.squeeze.$(SECTION)";
-   ExtraOverride "override.squeeze.extra.$(SECTION)";
-   SrcOverride "override.squeeze.$(SECTION).src";
-   Contents " ";
-};
-
 tree "dists/unstable"
 {
    FileList "/srv/ftp-master.debian.org/database/dists/unstable_$(SECTION)_binary-$(ARCH).list";
index 648be641f49d898e5982613c92fa62f0470fb6c3..718bdc248fe1a246e39e786da143b980264d76ce 100644 (file)
@@ -195,19 +195,7 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-changes@lists.debian.org";
-       // Version "5.0r0";
-       Origin "Debian";
-       // Description "Debian 5.0r0 Released 14 February 2009";
-       CodeName "lenny";
-       OverrideCodeName "lenny";
-       Priority "5";
        ChangeLogBase "dists/stable/";
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
   };
 
   Proposed-Updates
@@ -218,18 +206,11 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-changes@lists.debian.org";
        CopyChanges "dists/proposed-updates/";
        CopyDotDak "/srv/ftp-master.debian.org/queue/proposed-updates/";
        CommentsDir "/srv/ftp-master.debian.org/queue/p-u-new/COMMENTS/";
-       Version "5.0-updates";
-       Origin "Debian";
-       Description "Debian 5.0 Proposed Updates - Not Released";
-       CodeName "lenny-proposed-updates";
-       OverrideCodeName "lenny";
        OverrideSuite "stable";
        ValidTime 604800; // 7 days
-       Priority "4";
        VersionChecks
        {
          MustBeNewerThan
@@ -248,72 +229,6 @@ Suite
            Stable;
          };
        };
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
-  };
-
-  Lenny-Volatile
-  {
-       Components
-       {
-         main;
-         contrib;
-         non-free;
-       };
-       Announce "debian-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Volatile Packages for Debian 5.0";
-       CodeName "lenny-volatile";
-       OverrideCodeName "lenny";
-       OverrideSuite "stable";
-       ValidTime 604800; // 7 days
-       NotAutomatic "yes";
-       Priority "0";
-       VersionChecks
-       {
-         MustBeNewerThan
-         {
-           Stable;
-         };
-         Enhances
-      {
-           Stable;
-         };
-       };
-
-  };
-
-  Lenny-Volatile-Proposed-Updates
-  {
-       Components
-       {
-         main;
-         contrib;
-         non-free;
-       };
-       Announce "debian-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Proposed Volatile Packages for Debian 5.0";
-       CodeName "lenny-volatile-proposed-updates";
-       OverrideCodeName "lenny";
-       OverrideSuite "stable";
-       ValidTime 604800; // 7 days
-       NotAutomatic "yes";
-       Priority "0";
-       VersionChecks
-       {
-         MustBeNewerThan
-         {
-           Stable;
-         };
-         Enhances
-      {
-           Stable;
-         };
-       };
   };
 
   Testing
@@ -324,18 +239,7 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-testing-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Debian Testing distribution - Not Released";
-       CodeName "squeeze";
-       OverrideCodeName "squeeze";
        ValidTime 604800; // 7 days
-       Priority "5";
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
   };
 
   Testing-Proposed-Updates
@@ -346,14 +250,8 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-testing-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Debian Testing distribution updates - Not Released";
-       CodeName "squeeze-proposed-updates";
-       OverrideCodeName "squeeze";
        OverrideSuite "testing";
        ValidTime 604800; // 7 days
-       Priority "6";
        VersionChecks
        {
          MustBeNewerThan
@@ -373,11 +271,6 @@ Suite
            Testing;
           };
        };
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
   };
 
   Squeeze-Volatile
@@ -388,15 +281,8 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-testing-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Volatile Packages for Debian x.y (testing)";
-       CodeName "squeeze-volatile";
-       OverrideCodeName "squeeze";
        OverrideSuite "testing";
        ValidTime 604800; // 7 days
-       NotAutomatic "yes";
-       Priority "0";
        VersionChecks
        {
          MustBeNewerThan
@@ -412,37 +298,6 @@ Suite
 
   };
 
-  Squeeze-Volatile-Proposed-Updates
-  {
-       Components
-       {
-         main;
-         contrib;
-         non-free;
-       };
-       Announce "debian-testing-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Proposed Volatile Packages for Debian x.y (testing)";
-       CodeName "squeeze-volatile-proposed-updates";
-       OverrideCodeName "squeeze";
-       OverrideSuite "testing";
-       ValidTime 604800; // 7 days
-       NotAutomatic "yes";
-       Priority "0";
-       VersionChecks
-       {
-         MustBeNewerThan
-         {
-           Stable;
-           Testing;
-         };
-         Enhances
-      {
-           Testing;
-         };
-       };
-  };
-
   Unstable
   {
        Components
@@ -451,13 +306,7 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-devel-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Debian Unstable - Not Released";
-       CodeName "sid";
-       OverrideCodeName "sid";
        ValidTime 604800; // 7 days
-       Priority "7";
        VersionChecks
        {
          MustBeNewerThan
@@ -469,11 +318,6 @@ Suite
            Testing-Proposed-Updates;
          };
        };
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
   };
 
   Experimental
@@ -484,15 +328,8 @@ Suite
          contrib;
          non-free;
        };
-       Announce "debian-devel-changes@lists.debian.org";
-       Origin "Debian";
-       Description "Experimental packages - not released; use at your own risk.";
-       CodeName "experimental";
-       NotAutomatic "yes";
-       OverrideCodeName "sid";
        OverrideSuite "unstable";
        ValidTime 604800; // 7 days
-       Priority "0";
        VersionChecks
        {
          MustBeNewerThan
@@ -505,11 +342,6 @@ Suite
            Unstable;
          };
        };
-       UdebComponents
-       {
-         main;
-         non-free;
-       };
   };
 
 };
@@ -520,9 +352,7 @@ SuiteMappings
  "propup-version stable-security testing testing-proposed-updates unstable";
  "propup-version testing-security unstable";
  "map lenny stable";
- "map lenny-volatile lenny-volatile-proposed-updates";
  "map squeeze testing";
- "map squeeze-volatile squeeze-volatile-proposed-updates";
  "map sid unstable";
  "map rc-buggy experimental";
 // "map oldstable oldstable-proposed-updates";
@@ -584,8 +414,6 @@ Dir
     ProposedUpdates "/srv/ftp-master.debian.org/queue/p-u-new/";
     OldProposedUpdates "/srv/ftp-master.debian.org/queue/o-p-u-new/";
     ProposedUpdates "/srv/ftp-master.debian.org/queue/p-u-new/";
-    Lenny-Volatile-Proposed-Updates "/srv/ftp-master.debian.org/queue/volatile/lenny-volatile-p-u-new";
-    Squeeze-Volatile-Proposed-Updates "/srv/ftp-master.debian.org/queue/volatile/squeeze-volatile-p-u-new";
     Done "/srv/ftp-master.debian.org/queue/done/";
     Holding "/srv/ftp-master.debian.org/queue/holding/";
     New "/srv/ftp-master.debian.org/queue/new/";
index c5aeed131656094cdd76e318d19e91d6afb2f9a8..5805cc948179062c77afed695a1ace69f2becabc 100644 (file)
@@ -612,4 +612,5 @@ function changelogs() {
     mkdir -p ${exportpublic}/changelogs
     cd ${exportpublic}/changelogs
     rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
+    sudo -H -u archvsync /home/archvsync/runmirrors metaftpdo > ~dak/runmirrors-metadata.log 2>&1 &
 }
index 2987f9be10978ff58a2abc22f287a92d8bfb47e7..bca0c66223cfa55c2806ffd5af10112802f0dfdf 100755 (executable)
@@ -353,19 +353,13 @@ def main ():
             pass
 
         print "Processing %s%s..." % (osuite, originremark)
+        suiteobj = get_suite(osuite)
         # Get a list of all suites that use the override file of 'osuite'
-        ocodename = cnf["Suite::%s::codename" % osuite].lower()
-        suites = []
-        suiteids = []
-        for suite in cnf.SubTree("Suite").List():
-            if ocodename == cnf["Suite::%s::OverrideCodeName" % suite].lower():
-                suites.append(suite)
-                s = get_suite(suite.lower(), session)
-                if s is not None:
-                    suiteids.append(s.suite_id)
-
-        if len(suiteids) != len(suites) or len(suiteids) < 1:
-            utils.fubar("Couldn't find id's of all suites: %s" % suites)
+        ocodename = suiteobj.codename
+        suiteids = [x.suite_id for x in session.query(Suite).filter(Suite.overridecodename == ocodename).all()]
+
+        if len(suiteids) < 1:
+            utils.fubar("Couldn't find id's of all suites: %s" % suiteids)
 
         for component in cnf.SubTree("Component").List():
             # It is crucial for the dsc override creation based on binary
index 08940c7858944992ebba36641fbb207ddb123e05..7398f67078bf37f6e6b31d0ab647f9ff6dfbf5eb 100755 (executable)
@@ -116,6 +116,21 @@ tree "dists/testing"
    SrcOverride "override.squeeze.$(SECTION).src";
 };
 """
+
+    apt_trees["squeeze-volatile"]="""
+tree "dists/squeeze-volatile"
+{
+   FileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile_$(SECTION)_binary-$(ARCH).list";
+   SourceFileList "/srv/ftp-master.debian.org/database/dists/squeeze-volatile_$(SECTION)_source.list";
+   Sections "main contrib non-free";
+   Architectures "%(arch)s";
+   BinOverride "override.squeeze.$(SECTION)";
+   ExtraOverride "override.squeeze.extra.$(SECTION)";
+   SrcOverride "override.squeeze.$(SECTION).src";
+   Contents " ";
+};
+"""
+
     apt_trees["di"]["testing"]="""
 tree "dists/testing/main"
 {
@@ -283,7 +298,7 @@ tree "dists/proposed-updates/main"
         if arch != 'source':
             if arch == 'hurd-i386' and suite == 'experimental':
                 pass
-            else:
+            elif apt_trees["di"].has_key(suite):
                 if arch == "amd64":
                     os.write(ac_fd, apt_trees["di"][suite] %
                              {'arch': arch, 'contentsline': 'Contents "$(DIST)/../Contents-udeb";'})
diff --git a/dak/init_db.py b/dak/init_db.py
deleted file mode 100755 (executable)
index 169f300..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/usr/bin/env python
-
-"""Sync dak.conf configuartion file and the SQL database"""
-# Copyright (C) 2000, 2001, 2002, 2003, 2006  James Troup <james@nocrew.org>
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-################################################################################
-
-import sys
-import apt_pkg
-
-from daklib import utils
-from daklib.dbconn import *
-from daklib.config import Config
-
-################################################################################
-
-def usage(exit_code=0):
-    """Print a usage message and exit with 'exit_code'."""
-
-    print """Usage: dak init-db
-Initalizes some tables in the projectB database based on the config file.
-
-  -h, --help                show this help and exit."""
-    sys.exit(exit_code)
-
-################################################################################
-
-class InitDB(object):
-    def __init__(self, Cnf, projectB):
-        self.Cnf = Cnf
-        self.projectB = projectB
-
-    def do_archive(self):
-        """initalize the archive table."""
-
-        # Remove existing archives
-        s = self.projectB.session()
-        s.query(Archive).delete()
-
-        for name in self.Cnf.SubTree("Archive").List():
-            a = Archive()
-            a.archive_name  = name
-            a.origin_server = self.Cnf.get("Archive::%s::OriginServer" % name, "")
-            a.description   = self.Cnf.get("Archive::%s::Description" % name,  "")
-            s.add(a)
-
-        s.commit()
-
-    def do_architecture(self):
-        """Initalize the architecture table."""
-
-        # Remove existing architectures
-        s = self.projectB.session()
-        s.query(Architecture).delete()
-
-        for arch in self.Cnf.SubTree("Architectures").List():
-            a = Architecture()
-            a.arch_string  = arch
-            a.description  = self.Cnf.get("Architecture::%s" % arch, "")
-            s.add(a)
-
-        s.commit()
-
-    def do_component(self):
-        """Initalize the component table."""
-
-        # Remove existing components
-        s = self.projectB.session()
-        s.query(Component).delete()
-
-        for name in self.Cnf.SubTree("Component").List():
-            c = Component()
-            c.component_name = name
-            c.description = self.Cnf.get("Component::%s::Description" % name, "")
-            c.meets_dfsg  = False
-            if self.Cnf.get("Component::%s::MeetsDFSG" % name, "false").lower() == 'true':
-                c.meets_dfsg = True
-            s.add(c)
-
-        s.commit()
-
-    def do_location(self):
-        """Initalize the location table."""
-
-        # Remove existing locations
-        s = self.projectB.session()
-        s.query(Location).delete()
-
-        for location in self.Cnf.SubTree("Location").List():
-            archive_name = self.Cnf.get("Location::%s::Archive" % location, "")
-            a = s.query(Archive).filter_by(archive_name=archive_name)
-            if a.count() < 1:
-                utils.fubar("E: Archive '%s' for location '%s' not found" % (archive_name, location))
-            archive_id = a.one().archive_id
-
-            location_type = self.Cnf.get("Location::%s::Type" % location, "")
-            if location_type != 'pool':
-                utils.fubar("E: type %s not recognised for location %s" % (location_type, location))
-
-            for component in self.Cnf.SubTree("Component").List():
-                c = s.query(Component).filter_by(component_name=component)
-                if c.count() < 1:
-                    utils.fubar("E: Can't find component %s for location %s" % (component, location))
-                component_id = c.one().component_id
-
-                l = Location()
-                l.path = location
-                l.archive_id = archive_id
-                l.component_id = component_id
-                l.archive_type = location_type
-                s.add(l)
-
-        s.commit()
-
-    def do_suite(self):
-        """Initialize the suite table."""
-
-        s = self.projectB.session()
-        s.query(Suite).delete()
-
-        for suite in self.Cnf.SubTree("Suite").List():
-            suite = suite.lower()
-            su = Suite()
-            su.suite_name  = suite
-            su.version     = self.Cnf.get("Suite::%s::Version" % suite, "-")
-            su.origin      = self.Cnf.get("Suite::%s::Origin" % suite, "")
-            su.description = self.Cnf.get("Suite::%s::Description" % suite, "")
-            s.add(su)
-
-            for architecture in self.Cnf.ValueList("Suite::%s::Architectures" % (suite)):
-                sa = SuiteArchitecture()
-                a = s.query(Architecture).filter_by(arch_string=architecture)
-                if a.count() < 1:
-                    utils.fubar("E: Architecture %s not found for suite %s" % (architecture, suite))
-                sa.arch_id = a.one().arch_id
-                sa.suite_id = su.suite_id
-                s.add(sa)
-
-        s.commit()
-
-    def do_override_type(self):
-        """Initalize the override_type table."""
-
-        s = self.projectB.session()
-        s.query(OverrideType).delete()
-
-        for override_type in self.Cnf.ValueList("OverrideType"):
-            ot = OverrideType()
-            ot.overridetype = override_type
-            s.add(ot)
-
-        s.commit()
-
-    def do_priority(self):
-        """Initialize the priority table."""
-
-        s = self.projectB.session()
-        s.query(Priority).delete()
-
-        for priority in self.Cnf.SubTree("Priority").List():
-            p = Priority()
-            p.priority = priority
-            p.level    = self.Cnf.get("Priority::" + priority, "0")
-            s.add(p)
-
-        s.commit()
-
-    def do_section(self):
-        """Initalize the section table."""
-
-        s = self.projectB.session()
-        s.query(Section).delete()
-
-        for component in self.Cnf.SubTree("Component").List():
-            if self.Cnf["Control-Overrides::ComponentPosition"] == "prefix":
-                suffix = ""
-                if component != "main":
-                    prefix = component + '/'
-                else:
-                    prefix = ""
-            else:
-                prefix = ""
-                if component != "main":
-                    suffix = '/' + component
-                else:
-                    suffix = ""
-
-            for section in self.Cnf.ValueList("Section"):
-                sec = Section()
-                sec.section = prefix + section + suffix
-                s.add(sec)
-
-        s.commit()
-
-    def do_all(self):
-        self.do_archive()
-        self.do_architecture()
-        self.do_component()
-        self.do_location()
-        self.do_suite()
-        self.do_override_type()
-        self.do_priority()
-        self.do_section()
-
-################################################################################
-
-def main ():
-    """Sync dak.conf configuartion file and the SQL database"""
-
-    Cnf = utils.get_conf()
-    arguments = [('h', "help", "Init-DB::Options::Help")]
-    for i in [ "help" ]:
-        if not Cnf.has_key("Init-DB::Options::%s" % (i)):
-            Cnf["Init-DB::Options::%s" % (i)] = ""
-
-    arguments = apt_pkg.ParseCommandLine(Cnf, arguments, sys.argv)
-
-    options = Cnf.SubTree("Init-DB::Options")
-    if options["Help"]:
-        usage()
-    elif arguments:
-        utils.warn("dak init-db takes no arguments.")
-        usage(exit_code=1)
-
-    # Just let connection failures be reported to the user
-    projectB = DBConn()
-    Cnf = Config()
-
-    InitDB(Cnf, projectB).do_all()
-
-################################################################################
-
-if __name__ == '__main__':
-    main()
index 80e221532db9944d5a7589cf0051a80aa7e85914..4a113b0c6a0793304ea2e6b8d87e146f53a1fcb1 100755 (executable)
@@ -131,9 +131,9 @@ def main():
 
     session = DBConn().session()
 
-    for suite in cnf.SubTree("Suite").List():
-        suite = suite.lower()
-        suite_priority = int(cnf["Suite::%s::Priority" % (suite)])
+    for suite in session.query(Suite).all():
+        suite_name = suite.suite_name
+        suite_priority = suite.priority
 
         # Source packages
         if gen_uploaders:
@@ -143,14 +143,14 @@ def main():
                                       AND sa.suite = su.id AND sa.source = s.id
                                       AND m.id = srcu.maintainer
                                       AND srcu.source = s.id""",
-                                    {'suite_name': suite})
+                                    {'suite_name': suite_name})
         else:
             q = session.execute("""SELECT s.source, s.version, m.name
                                      FROM src_associations sa, source s, suite su, maintainer m
                                     WHERE su.suite_name = :suite_name
                                       AND sa.suite = su.id AND sa.source = s.id
                                       AND m.id = s.maintainer""",
-                                    {'suite_name': suite})
+                                    {'suite_name': suite_name})
 
         for source in q.fetchall():
             package = source[0]
@@ -175,13 +175,13 @@ def main():
                                     WHERE s.suite_name = :suite_name
                                       AND ba.suite = s.id AND ba.bin = b.id
                                       AND b.source = srcu.source""",
-                                   {'suite_name': suite})
+                                   {'suite_name': suite_name})
         else:
             q = session.execute("""SELECT b.package, b.source, b.maintainer, b.version
                                      FROM bin_associations ba, binaries b, suite s
                                     WHERE s.suite_name = :suite_name
                                       AND ba.suite = s.id AND ba.bin = b.id""",
-                                   {'suite_name': suite})
+                                   {'suite_name': suite_name})
 
 
         for binary in q.fetchall():
index 8b8fd46f61709ed3d078ffe67ae8799b6ac8dc3e..02c7f7c2988843d8f6ffe31364c5e58ca789ac2e 100755 (executable)
@@ -120,7 +120,7 @@ def main ():
             continue
 
         sys.stderr.write("Processing %s...\n" % (suite.suite_name))
-        override_suite = cnf["Suite::%s::OverrideCodeName" % (suite_name)]
+        override_suite = suite.overridecodename
 
         for component_name in cnf.SubTree("Component").List():
             component = get_component(component_name, session)
index 7c61e2a42948fa58e2bce7a0d50493d981ebfee0..bbd58881f0b66883bf71557510b09ec980179d29 100755 (executable)
@@ -111,17 +111,6 @@ def longest(list):
             longest = l
     return longest
 
-def suite_sort(a, b):
-    if Cnf.has_key("Suite::%s::Priority" % (a)):
-        a_priority = int(Cnf["Suite::%s::Priority" % (a)])
-    else:
-        a_priority = 0
-    if Cnf.has_key("Suite::%s::Priority" % (b)):
-        b_priority = int(Cnf["Suite::%s::Priority" % (b)])
-    else:
-        b_priority = 0
-    return cmp(a_priority, b_priority)
-
 def output_format(suite):
     output_suite = []
     for word in suite.split("-"):
@@ -164,7 +153,6 @@ def number_of_packages():
     ## Print the results
     # Setup
     suite_list = suites.values()
-    suite_list.sort(suite_sort)
     suite_id_list = []
     suite_arches = {}
     for suite in suite_list:
index 7d7faa4bb510150157215cee7959a04e77396daf..c379b0bcf8c7d92c3292d1de3bae8a48805788a9 100755 (executable)
@@ -1913,7 +1913,8 @@ distribution."""
         self.Subst["__SHORT_SUMMARY__"] = short_summary
 
         for dist in self.pkg.changes["distribution"].keys():
-            announce_list = cnf.Find("Suite::%s::Announce" % (dist))
+            suite = get_suite(dist)
+            announce_list = suite.announce
             if announce_list == "" or lists_done.has_key(announce_list):
                 continue
 
diff --git a/scripts/debian/import_dataset.sh b/scripts/debian/import_dataset.sh
new file mode 100755 (executable)
index 0000000..d4e1fb7
--- /dev/null
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# Copyright (C) 2008,2010 Joerg Jaspert <joerg@debian.org>
+
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+set -e
+set -u
+
+# Load up some standard variables
+export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
+. $SCRIPTVARS
+
+IMPORTSUITE=${1:-"testing"}
+BRITNEY=""
+
+case "${IMPORTSUITE}" in
+    testing)
+        # What file we look at.
+        INPUTFILE="/srv/release.debian.org/britney/Heidi/set/current"
+        DO_CHANGELOG="true"
+        ;;
+    squeeze-volatile)
+        # What file we look at.
+        INPUTFILE="/srv/release.debian.org/volatile/set/squeeze-volatile"
+        DO_CHANGELOG="false"
+        ;;
+    *)
+        echo "You are so wrong here that I can't even believe it. Sod off."
+        exit 42
+        ;;
+esac
+
+# Change to a known safe location
+cd $masterdir
+
+echo "Importing new data for ${IMPORTSUITE} into database"
+
+if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then
+    rm ${ftpdir}/dists/${IMPORTSUITE}/ChangeLog
+    BRITNEY=" --britney"
+fi
+
+cat ${INPUTFILE} | dak control-suite --set ${IMPORTSUITE} ${BRITNEY}
+
+if [ "x${DO_CHANGELOG}x" = "xtruex" ]; then
+    NOW=$(date "+%Y%m%d%H%M")
+    cd ${ftpdir}/dists/${IMPORTSUITE}/
+    mv ChangeLog ChangeLog.${NOW}
+    ln -s ChangeLog.${NOW} ChangeLog
+    find . -maxdepth 1 -mindepth 1 -type f -mmin +2880 -name 'ChangeLog.*' -delete
+fi
+
+echo "Done"
+
+exit 0
diff --git a/scripts/debian/import_testing.sh b/scripts/debian/import_testing.sh
deleted file mode 100755 (executable)
index 7ee29ea..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2008 Joerg Jaspert <joerg@debian.org>
-
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-set -e
-
-# Load up some standard variables
-export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
-. $SCRIPTVARS
-
-# What file we look at.
-TESTINGINPUT="/srv/release.debian.org/britney/Heidi/set/current"
-
-# Change to a known safe location
-cd $masterdir
-
-echo "Importing new data for testing into projectb"
-
-# Now load the data
-rm ${ftpdir}/dists/testing/ChangeLog
-cat ${TESTINGINPUT} | dak control-suite --set testing --britney
-NOW=$(date "+%Y%m%d%H%M")
-cd ${ftpdir}/dists/testing/
-mv ChangeLog ChangeLog.${NOW}
-ln -s ChangeLog.${NOW} ChangeLog
-find . -maxdepth 1 -mindepth 1 -type f -mmin +2880 -name 'ChangeLog.*' -print0 | xargs --no-run-if-empty -0 rm
-
-echo "Done"
-
-exit 0
index a8c9e2fd3e07bead6909a9d6d977ddcc3f3b2fcb..78addd22b9ce49b21236822dbddae553b822b90b 100644 (file)
@@ -6,7 +6,7 @@ X-Debian: DAK
 MIME-Version: 1.0
 Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: 8bit
-Subject:  Bug#__BUG_NUMBER__: __SUBJECT__
+Subject: Bug#__BUG_NUMBER__: __SUBJECT__
 
 We believe that the bug you reported is now fixed; the following
 package(s) have been removed from __SUITE_LIST__: