aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDafydd Harries <daf@rhydd.org>2013-05-23 05:31:03 -0400
committerDafydd Harries <daf@rhydd.org>2013-05-23 05:31:03 -0400
commit473c023c1cf4f08ab489f02ebe5bd6fba90595b3 (patch)
tree1eebb8c560d23d302ed810eb1f4d0c941e8d8074
parent6dacb4f3f5e5c6d53135ae66ea559d2ffc4f0aa7 (diff)
in Import template, include reference to source packages + versions
-rw-r--r--export.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/export.py b/export.py
index 7f9ca24..bc4c53a 100644
--- a/export.py
+++ b/export.py
@@ -206,9 +206,15 @@ def extract_resources(cp_header):
('Resource URL', cp_header[key])])
def export_srcpkgs(data, name, srcpkg_names):
+ # Map source package names to binary packages, and also make note
+ # of which versions of those source packages we're looking at.
binpkgs = pd.concat([
data.pkgs[data.pkgs['_srcpkg'] == srcpkg]
for srcpkg in srcpkg_names])
+ versions = {}
+
+ for (_i, pkg) in binpkgs.iterrows():
+ versions[pkg['_srcpkg']] = pkg['Version']
if len(binpkgs) == 0:
warn('no binary packages found for', srcpkg_names)
@@ -254,6 +260,8 @@ def export_srcpkgs(data, name, srcpkg_names):
('Source', 'Debian'),
('Source link',
'http://packages.debian.org/sid/' + srcpkg_names[0]),
+ ('Source packages',
+ ', '.join('%s %s' % (k, v) for (k, v) in versions.iteritems())),
('Date', today())])
people = []