mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* reverse-depends: Now that Debian is supported server-side:
- Convert Debian release aliases to codenames. - Default to the devel release of the vendor distribution.
This commit is contained in:
parent
d373b65c3e
commit
08754a3c71
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -7,6 +7,9 @@ ubuntu-dev-tools (0.139) UNRELEASED; urgency=low
|
||||
(LP: #919805)
|
||||
* pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and
|
||||
ARCH. Thanks Alessio Treglia. (Closes: #659060, LP: #423609)
|
||||
* reverse-depends: Now that Debian is supported server-side:
|
||||
- Convert Debian release aliases to codenames.
|
||||
- Default to the devel release of the vendor distribution.
|
||||
|
||||
-- Stefano Rivera <stefanor@debian.org> Fri, 23 Dec 2011 22:33:17 +0200
|
||||
|
||||
|
@ -18,20 +18,23 @@ import optparse
|
||||
import sys
|
||||
|
||||
from devscripts.logger import Logger
|
||||
from distro_info import UbuntuDistroInfo
|
||||
|
||||
from ubuntutools.misc import (system_distribution, vendor_to_distroinfo,
|
||||
codename_to_distribution)
|
||||
from ubuntutools.rdepends import query_rdepends, RDependsException
|
||||
|
||||
|
||||
def main():
|
||||
system_distro_info = vendor_to_distroinfo(system_distribution())()
|
||||
parser = optparse.OptionParser('%prog [options] package',
|
||||
description="List reverse-dependencies of package. "
|
||||
"If the package name is prefixed with src: then the "
|
||||
"reverse-dependencies of all the binary packages that "
|
||||
"the specified source package builds will be listed.")
|
||||
parser.add_option('-r', '--release', metavar='RELEASE',
|
||||
default=UbuntuDistroInfo().devel(),
|
||||
help='Query dependencies in RELEASE. Default: devel')
|
||||
default=system_distro_info.devel(),
|
||||
help='Query dependencies in RELEASE. '
|
||||
'Default: %s' % system_distro_info.devel())
|
||||
parser.add_option('-R', '--without-recommends',
|
||||
action='store_false', dest='recommends', default=True,
|
||||
help='Only consider Depends relationships, '
|
||||
@ -68,6 +71,14 @@ def main():
|
||||
if options.server is not None:
|
||||
opts['server'] = options.server
|
||||
|
||||
# Convert unstable/testing aliases to codenames:
|
||||
distribution = codename_to_distribution(options.release)
|
||||
if not distribution:
|
||||
parser.error('Unknown release codename %s' % options.release)
|
||||
distro_info = vendor_to_distroinfo(distribution)()
|
||||
options.release = distro_info.codename(options.release,
|
||||
default=options.release)
|
||||
|
||||
try:
|
||||
data = query_rdepends(package, options.release, options.arch, **opts)
|
||||
except RDependsException, e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user