4
# Copyright (C) 2007 Stefano Zacchiroli <zack@debian.org>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
"""Dumb maintainer-based grep for the dpkg status file."""
15
from debian_bundle import deb822
18
maint_RE = re.compile(sys.argv[1])
20
print >>sys.stderr, "Usage: grep-maintainer REGEXP"
23
print >>sys.stderr, "Error in the regexp: %s" % (e,)
26
for pkg in deb822.Packages.iter_paragraphs(file('/var/lib/dpkg/status')):
27
if pkg.has_key('Maintainer') and maint_RE.search(pkg['maintainer']):