X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_packages_sources.py;h=f1d07fab5779325d29b0293747d9ef4624cf1ba6;hb=6cb0b0401eaeeb6900551c20617f0a8f2293cd89;hp=6e91aedae5470474a5130c3bfe59d002816d4682;hpb=23a6a05608604aa34382b41f70f8252c6a52a7cb;p=dak.git diff --git a/dak/generate_packages_sources.py b/dak/generate_packages_sources.py index 6e91aeda..f1d07fab 100755 --- a/dak/generate_packages_sources.py +++ b/dak/generate_packages_sources.py @@ -111,19 +111,34 @@ tree "dists/testing" SourceFileList "/srv/ftp-master.debian.org/database/dists/testing_$(SECTION)_source.list"; Sections "main contrib non-free"; Architectures "%(arch)s"; + BinOverride "override.wheezy.$(SECTION)"; + ExtraOverride "override.wheezy.extra.$(SECTION)"; + SrcOverride "override.wheezy.$(SECTION).src"; +}; +""" + + apt_trees["squeeze-updates"]=""" +tree "dists/squeeze-updates" +{ + FileList "/srv/ftp-master.debian.org/database/dists/squeeze-updates_$(SECTION)_binary-$(ARCH).list"; + SourceFileList "/srv/ftp-master.debian.org/database/dists/squeeze-updates_$(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" { FileList "/srv/ftp-master.debian.org/database/dists/testing_main_$(SECTION)_binary-$(ARCH).list"; Sections "debian-installer"; Architectures "%(arch)s"; - BinOverride "override.squeeze.main.$(SECTION)"; - SrcOverride "override.squeeze.main.src"; + BinOverride "override.wheezy.main.$(SECTION)"; + SrcOverride "override.wheezy.main.src"; BinCacheDB "packages-debian-installer-$(ARCH).db"; Packages::Extensions ".udeb"; %(contentsline)s @@ -134,8 +149,8 @@ tree "dists/testing/non-free" FileList "/srv/ftp-master.debian.org/database/dists/testing_non-free_$(SECTION)_binary-$(ARCH).list"; Sections "debian-installer"; Architectures "%(arch)s"; - BinOverride "override.squeeze.main.$(SECTION)"; - SrcOverride "override.squeeze.main.src"; + BinOverride "override.wheezy.main.$(SECTION)"; + SrcOverride "override.wheezy.main.src"; BinCacheDB "packages-debian-installer-$(ARCH).db"; Packages::Extensions ".udeb"; %(contentsline)s @@ -224,9 +239,9 @@ tree "dists/testing-proposed-updates" SourceFileList "/srv/ftp-master.debian.org/database/dists/testing-proposed-updates_$(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"; + BinOverride "override.wheezy.$(SECTION)"; + ExtraOverride "override.wheezy.extra.$(SECTION)"; + SrcOverride "override.wheezy.$(SECTION).src"; Contents " "; }; """ @@ -236,8 +251,8 @@ tree "dists/testing-proposed-updates/main" FileList "/srv/ftp-master.debian.org/database/dists/testing-proposed-updates_main_$(SECTION)_binary-$(ARCH).list"; Sections "debian-installer"; Architectures "%(arch)s"; - BinOverride "override.squeeze.main.$(SECTION)"; - SrcOverride "override.squeeze.main.src"; + BinOverride "override.wheezy.main.$(SECTION)"; + SrcOverride "override.wheezy.main.src"; BinCacheDB "packages-debian-installer-$(ARCH).db"; Packages::Extensions ".udeb"; Contents " "; @@ -251,9 +266,9 @@ tree "dists/proposed-updates" SourceFileList "/srv/ftp-master.debian.org/database/dists/proposed-updates_$(SECTION)_source.list"; Sections "main contrib non-free"; Architectures "%(arch)s"; - BinOverride "override.lenny.$(SECTION)"; - ExtraOverride "override.lenny.extra.$(SECTION)"; - SrcOverride "override.lenny.$(SECTION).src"; + BinOverride "override.squeeze.$(SECTION)"; + ExtraOverride "override.squeeze.extra.$(SECTION)"; + SrcOverride "override.squeeze.$(SECTION).src"; Contents " "; }; """ @@ -263,8 +278,8 @@ tree "dists/proposed-updates/main" FileList "/srv/ftp-master.debian.org/database/dists/proposed-updates_main_$(SECTION)_binary-$(ARCH).list"; Sections "debian-installer"; Architectures "%(arch)s"; - BinOverride "override.lenny.main.$(SECTION)"; - SrcOverride "override.lenny.main.src"; + BinOverride "override.squeeze.main.$(SECTION)"; + SrcOverride "override.squeeze.main.src"; BinCacheDB "packages-debian-installer-$(ARCH).db"; Packages::Extensions ".udeb"; Contents " "; @@ -274,7 +289,7 @@ tree "dists/proposed-updates/main" cnf = Config() try: # Write apt.conf - (ac_fd, ac_name) = mkstemp(dir=tmppath) + (ac_fd, ac_name) = mkstemp(dir=tmppath, suffix=suite, prefix=arch) os.write(ac_fd, DAILY_APT_CONF) # here we want to generate the tree entries os.write(ac_fd, apt_trees[suite] % {'arch': arch}) @@ -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";'}) @@ -360,19 +375,19 @@ def main (): startdir = os.getcwd() os.chdir(cnf["Dir::TempPath"]) - # Setup a multiprocessing Pool. As many workers as we have CPU cores. - pool = Pool() - # For each given suite, each architecture, run one apt-ftparchive for s in suites: + # Setup a multiprocessing Pool. As many workers as we have CPU cores. + pool = Pool() arch_list=get_suite_architectures(s.suite_name, skipsrc=False, skipall=True, session=session) Logger.log(['generating output for Suite %s, Architectures %s' % (s.suite_name, map(sname, arch_list))]) for a in arch_list: pool.apply_async(generate_packages_sources, (a.arch_string, s.suite_name, cnf["Dir::TempPath"])) - # No more work will be added to our pool, close it and then wait for all to finish - pool.close() - pool.join() + # No more work will be added to our pool, close it and then wait for all to finish + pool.close() + pool.join() + os.chdir(startdir) # this script doesn't change the database session.close()