[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-811-gcddb6b0

Andreas Beckmann debian at abeckmann.de
Tue Jun 19 09:47:53 UTC 2012


The following commit has been merged in the piatti branch:
commit d6724aef0cbc94bcd0d94115ddd8b60114ee5995
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Jun 13 10:25:52 2012 +0200

    p-s: test package with qualified version
    
    Let the slave pass a qualified package=version argument name to
    piuparts.  Useful for testing 'partial' distributions (like
    secrity updates or backports) where a different package version
    is also available in the 'base' distribution.
    
    Also avoid testing a wrong package version if a mirror push has
    happened after the master assigned the package and the slave has
    loaded the Packages file, but before the package gets tested.
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index dbcdae1..c0c814d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -141,6 +141,8 @@ piuparts (0.45) UNRELEASED; urgency=low
       press Ctrl-C once to exit after the current piuparts test has finished,
       press Ctrl-C again to cleanly terminate the currently running test,
       press Ctrl-C again to abort any ongoing cleanup.
+    - Pass a version qualified package name (foo=1.2-3) to piuparts to ensure
+      the correct package version gets tested.
   * piuparts-report.py:
     - Remove known_circular_depends handling.
     - Exclude obsolete states from generated report.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index f5be5e2..940cbeb 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -419,7 +419,7 @@ class Section:
             test_count += 1
             if package_name in packages_file:
                 package = packages_file[package_name]
-                if version == package["Version"] or self._config["upgrade-test-distros"]:
+                if version == package["Version"]:
                     test_package(self._config, package, packages_files)
                 else:
                     create_file(os.path.join("untestable",
@@ -544,7 +544,7 @@ def test_package(config, package, packages_files):
         command.extend(["-d", config["distro"]])
         if config["keep-sources-list"] in ["yes", "true"]:
             command.append("--keep-sources-list")
-        command.extend(["--apt", package["Package"]])
+        command.extend(["--apt", "%s=%s" % (package["Package"], package["Version"])])
 
         output.write("Executing: %s\n" % " ".join(command))
         ret,f = run_test_with_timeout(command, MAX_WAIT_TEST_RUN)
@@ -558,7 +558,7 @@ def test_package(config, package, packages_files):
         command.extend(["-b", config["upgrade-test-chroot-tgz"]])
         for distro in config["upgrade-test-distros"].split():
             command.extend(["-d", distro])
-        command.extend(["--apt", package["Package"]])
+        command.extend(["--apt", "%s=%s" % (package["Package"], package["Version"])])
 
         output.write("Executing: %s\n" % " ".join(command))
         ret,f = run_test_with_timeout(command, MAX_WAIT_TEST_RUN)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list