[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.48-55-gc89d173
Andreas Beckmann
debian at abeckmann.de
Thu Dec 20 19:14:50 UTC 2012
The following commit has been merged in the develop branch:
commit 682922ef18fc967e7b9268c905f4f0beffc60168
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sat Nov 3 18:02:17 2012 +0100
p: qualify package names extracted from .debs with the package version
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index 5ffc541..cbf5317 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ piuparts (0.49) UNRELEASED; urgency=low
package sources, e.g. backports, security or local repositories.
The argument must be a valid line (including whitespace) that is added
to sources.list verbatim. The option may be repeated to add more lines.
+ - Qualify to the package names extracted from .debs with the version.
* piuparts.conf:
* piupartslib/conf.py:
- Add get_final_distro() method.
diff --git a/piuparts.py b/piuparts.py
index c120f21..687d872 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1959,9 +1959,18 @@ def get_package_names_from_package_files(package_files):
vlist = []
for filename in package_files:
(status, output) = run(["dpkg", "--info", filename])
+ p = None
+ v = None
for line in [line.lstrip() for line in output.split("\n")]:
- if line[:len("Package:")] == "Package:":
- vlist.append(line.split(":", 1)[1].strip())
+ if line.startswith("Package:"):
+ p = line.split(":", 1)[1].strip()
+ if line.startswith("Version:"):
+ v = line.split(":", 1)[1].strip()
+ if p is not None:
+ if v is not None:
+ vlist.append(p + "=" + v)
+ else:
+ vlist.append(p)
return vlist
# Method to process a changes file, returning a list of all the .deb packages
--
piuparts git repository
More information about the Piuparts-commits
mailing list