[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: piuparts: Only depend on latest version

Holger Levsen gitlab at salsa.debian.org
Mon May 14 13:07:08 BST 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
daddbf9a by Philipp Hahn at 2018-05-14T12:02:18+00:00
piuparts: Only depend on latest version

It may happen that the Packages files contain multiple versions of a
package. Using `apt-cache show` list all of them leading to the
situation, where the generated "piuparts-depends-dummy" has multiple
dependencies on the same package with different versions:

  Depends: pkg (= 1), pkg (= 2)

Use `apt-cache show --no-all-versions` to only lists the version with
the highest priority.

- - - - -
cd8a7c65 by Holger Levsen at 2018-05-14T12:06:46+00:00
add changelog entry for Philipp

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- piuparts.py


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+piuparts (0.87) UNRELEASED; urgency=medium
+
+  [ Philipp Hahn ]
+  * piuparts.py: use `apt-cache show --no-all-versions` to prevent generating
+    a "piuparts-depends-dummy" package with multiple dependencies on the same
+    package with different versions. (Closes: #898606)
+
+ -- Holger Levsen <holger at debian.org>  Mon, 14 May 2018 12:03:45 +0000
+
 piuparts (0.86) unstable; urgency=medium
 
   * debian/control: switch packaging to salsa.debian.org. Thanks to the alioth


=====================================
piuparts.py
=====================================
--- a/piuparts.py
+++ b/piuparts.py
@@ -1180,7 +1180,7 @@ class Chroot:
         known_packages = []
         new_packages = []
         for name in packages:
-            (status, output) = self.run(["apt-cache", "show", name],
+            (status, output) = self.run(["apt-cache", "show", "--no-all-versions", name],
                                         ignore_errors=True)
             # apt-cache reports status for some virtual packages and packages
             # in status config-files-remaining state without installation
@@ -2292,7 +2292,7 @@ def install_purge_test(chroot, chroot_state, package_files, packages, extra_pack
         else:
             # We have package names.  Use apt to get all their control
             # information.
-            apt_cache_args = ["apt-cache", "show"]
+            apt_cache_args = ["apt-cache", "show", "--no-all-versions"]
             if os.environ["PIUPARTS_DISTRIBUTION"] in ["lenny"]:
                 # apt-cache in lenny does not accept version-qualified packages
                 apt_cache_args.extend(unqualify(packages))



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/ceba00e26faac78d53fa070ed5b70f7de5419c32...cd8a7c65f2a8dffd610bd95945de4a533eea2eb2

---
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/ceba00e26faac78d53fa070ed5b70f7de5419c32...cd8a7c65f2a8dffd610bd95945de4a533eea2eb2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20180514/d2a9e205/attachment-0001.html>


More information about the Piuparts-devel mailing list