[Pkg-python-debian-commits] r58 /bzr/pkg-python-debian/trunk: Packages file parsing: normalize field names to lowercase and yield dictionaries instead of tuple.
zack at bononia.it
zack at bononia.it
Sun Jul 8 19:06:25 UTC 2007
------------------------------------------------------------
revno: 58
committer: zack at bononia.it
branch nick: pkg-python-debian
timestamp: Sun 2007-07-08 21:06:25 +0200
message:
Packages file parsing: normalize field names to lowercase and yield dictionaries instead of tuple.
Fixed examples accordingly.
modified:
debian/changelog
debian_bundle/debian_support.py
examples/packages/grep-maintainer
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2007-07-08 18:18:10 +0000
+++ b/debian/changelog 2007-07-08 19:06:25 +0000
@@ -1,18 +1,17 @@
-python-debian (0.1.5) unstable; urgency=low
+python-debian (0.1.4) UNRELEASED; urgency=low
[ James Westby ]
* changelog.py
- Add allow_empty_author option to changelog to allow the author line
to have no information.
- -- James Westby <jw+debian at jameswestby.net> Sun, 08 Jul 2007 19:16:04 +0100
-
-python-debian (0.1.4) UNRELEASED; urgency=low
-
[ Stefano Zacchiroli ]
* debian/control
- joining the team: add myself as an uploader
- add Vcs-Bzr field pointing to our Bzr repository on bzr.debian.org
+ * debian_support.py
+ - yield dictionaries instead of tuples in Packages parsing and normalize
+ to lower case 822 field names (Closes: #431087)
* examples/
- added grep-maintainer example to show the Packages parsing API
@@ -27,7 +26,7 @@
- The above generation depends on m4, so add that as a Build-Depends
- Add myself as an uploader
- -- John Wright <john at movingsucks.org> Sat, 30 Jun 2007 21:53:00 -0600
+ -- Stefano Zacchiroli <zack at debian.org> Sun, 08 Jul 2007 21:04:08 +0200
python-debian (0.1.3) unstable; urgency=low
=== modified file 'debian_bundle/debian_support.py'
--- a/debian_bundle/debian_support.py 2007-03-18 22:02:45 +0000
+++ b/debian_bundle/debian_support.py 2007-07-08 19:06:25 +0000
@@ -206,9 +206,9 @@
contents = "%s\n%s" % (contents, ncontents)
else:
break
- pkg.append((name, contents))
+ pkg.append((name.lower(), contents))
if pkg:
- yield pkg
+ yield dict(pkg)
def raiseSyntaxError(self, msg, lineno=None):
if lineno is None:
=== modified file 'examples/packages/grep-maintainer'
--- a/examples/packages/grep-maintainer 2007-06-30 13:28:46 +0000
+++ b/examples/packages/grep-maintainer 2007-07-08 19:06:25 +0000
@@ -22,7 +22,6 @@
packages = PackageFile('/var/lib/dpkg/status')
for pkg in packages:
- pkg_dict = dict(map(lambda (x,y): (x.lower(), y), pkg))
- if maint_RE.search(pkg_dict['maintainer']):
- print pkg_dict['package']
+ if maint_RE.search(pkg['maintainer']):
+ print pkg['package']
More information about the pkg-python-debian-commits
mailing list