[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.48-79-gdf94975

Andreas Beckmann debian at abeckmann.de
Sat Jan 12 11:33:10 UTC 2013


The following commit has been merged in the master branch:
commit d35d9e98b6e2fba07ef734eeaaad78e5a12a4d49
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Nov 4 14:02:48 2012 +0100

    p-m,p-r: combine package list and versions from different releases
    
    for distupgrade tests, example testing->sid:
    * take the package list from testing
      (therefore ignore all packages that are in sid only)
    * but the target version from sid
      (to re-run the test whenever a new package gets into sid)
    * use None as the version for packages that are in testing only
    
    Requires the following config:
    [sid]
    distro = testing
    upgrade-test-distros = testing sid
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index 4079fe6..e399dc2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,11 @@
 piuparts (0.49) UNRELEASED; urgency=low
 
   [ Andreas Beckmann ]
+  * Add support for dist-upgrade tests of "disappearing" packages:
+    - master/report: Get candidate packages from distro in the "distro"
+      setting in piuparts.conf and (target) versions to test from last distro
+      entry in "upgrade-test-distros". In case a package no longer exists, use
+      a pseudo-version "None".  (Closes: #656438)
   * piuparts.py:
     - Do not try to install unavailable packages (pseudo-version None) after
       dist-upgrade.
diff --git a/piuparts-master.py b/piuparts-master.py
index 594ca95..adfb417 100644
--- a/piuparts-master.py
+++ b/piuparts-master.py
@@ -161,6 +161,18 @@ class Master(Protocol):
         packages_file = piupartslib.open_packages_url(packages_url)
         db.read_packages_file(packages_file)
         packages_file.close()
+        if config.get_distro() != config.get_final_distro():
+            # take version numbers (or None) from final distro
+            packages_url = config.get_packages_url(distro=config.get_final_distro())
+            logging.info("Fetching %s" % packages_url)
+            packages_file = piupartslib.open_packages_url(packages_url)
+            db2 = piupartslib.packagesdb.PackagesFile(packages_file)
+            packages_file.close()
+            for package in db.get_all_packages().values():
+                if package["Package"] in db2:
+                    package["Version"] = db2[package["Package"]]["Version"]
+                else:
+                    package["Version"] = "None"
 
     def _clear_idle(self):
         if not self._idle_mode is False:
diff --git a/piuparts-report.py b/piuparts-report.py
index a450bd2..438a620 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -606,6 +606,18 @@ class Section:
         packages_file = piupartslib.open_packages_url(packages_url)
         db.read_packages_file(packages_file)
         packages_file.close()
+        if config.get_distro() != config.get_final_distro():
+            # take version numbers (or None) from final distro
+            packages_url = config.get_packages_url(distro=config.get_final_distro())
+            logging.info("Fetching %s" % packages_url)
+            packages_file = piupartslib.open_packages_url(packages_url)
+            db2 = piupartslib.packagesdb.PackagesFile(packages_file)
+            packages_file.close()
+            for package in db.get_all_packages().values():
+                if package["Package"] in db2:
+                    package["Version"] = db2[package["Package"]]["Version"]
+                else:
+                    package["Version"] = "None"
 
     def write_log_list_page(self, filename, title, preface, logs):
         packages = {}

-- 
piuparts git repository



More information about the Piuparts-commits mailing list