From: Joerg Jaspert Date: Sun, 19 Sep 2010 13:44:11 +0000 (+0200) Subject: Merge remote branch 'tolimar/rm-close-bugs' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=cac9d5c910d0c145c868df431654c32ef927ae3a;hp=1e532dabcf16f870f9815bf9a38a6a7077c79233;p=dak.git Merge remote branch 'tolimar/rm-close-bugs' into merge * tolimar/rm-close-bugs: Fix key error if do-close isn't set Add some debugging output Signed-off-by: Joerg Jaspert --- diff --git a/config/backports/dak.conf b/config/backports/dak.conf index eaa89c27..993cb80d 100644 --- a/config/backports/dak.conf +++ b/config/backports/dak.conf @@ -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"; }; }; diff --git a/config/backports/dinstall.functions b/config/backports/dinstall.functions index 2757a179..a19487f6 100644 --- a/config/backports/dinstall.functions +++ b/config/backports/dinstall.functions @@ -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 & } diff --git a/config/debian/apt.conf b/config/debian/apt.conf index 733e6025..9822577a 100644 --- a/config/debian/apt.conf +++ b/config/debian/apt.conf @@ -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"; diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 648be641..718bdc24 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -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/"; diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index c5aeed13..5805cc94 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -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 & } diff --git a/dak/check_overrides.py b/dak/check_overrides.py index 2987f9be..bca0c662 100755 --- a/dak/check_overrides.py +++ b/dak/check_overrides.py @@ -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 diff --git a/dak/generate_packages_sources.py b/dak/generate_packages_sources.py index 08940c78..7398f670 100755 --- a/dak/generate_packages_sources.py +++ b/dak/generate_packages_sources.py @@ -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 index 169f3005..00000000 --- a/dak/init_db.py +++ /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 - -# 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() diff --git a/dak/make_maintainers.py b/dak/make_maintainers.py index 80e22153..4a113b0c 100755 --- a/dak/make_maintainers.py +++ b/dak/make_maintainers.py @@ -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(): diff --git a/dak/make_overrides.py b/dak/make_overrides.py index 8b8fd46f..02c7f7c2 100755 --- a/dak/make_overrides.py +++ b/dak/make_overrides.py @@ -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) diff --git a/dak/stats.py b/dak/stats.py index 7c61e2a4..bbd58881 100755 --- a/dak/stats.py +++ b/dak/stats.py @@ -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: diff --git a/daklib/queue.py b/daklib/queue.py index 7d7faa4b..c379b0bc 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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 index 00000000..d4e1fb74 --- /dev/null +++ b/scripts/debian/import_dataset.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Copyright (C) 2008,2010 Joerg Jaspert + +# 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 index 7ee29eab..00000000 --- a/scripts/debian/import_testing.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2008 Joerg Jaspert - -# 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 diff --git a/templates/rm.bug-close b/templates/rm.bug-close index a8c9e2fd..78addd22 100644 --- a/templates/rm.bug-close +++ b/templates/rm.bug-close @@ -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__: