mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 09:31:08 +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)
|
(LP: #919805)
|
||||||
* pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and
|
* pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and
|
||||||
ARCH. Thanks Alessio Treglia. (Closes: #659060, LP: #423609)
|
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
|
-- Stefano Rivera <stefanor@debian.org> Fri, 23 Dec 2011 22:33:17 +0200
|
||||||
|
|
||||||
|
@ -18,20 +18,23 @@ import optparse
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from devscripts.logger import Logger
|
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
|
from ubuntutools.rdepends import query_rdepends, RDependsException
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
system_distro_info = vendor_to_distroinfo(system_distribution())()
|
||||||
parser = optparse.OptionParser('%prog [options] package',
|
parser = optparse.OptionParser('%prog [options] package',
|
||||||
description="List reverse-dependencies of package. "
|
description="List reverse-dependencies of package. "
|
||||||
"If the package name is prefixed with src: then the "
|
"If the package name is prefixed with src: then the "
|
||||||
"reverse-dependencies of all the binary packages that "
|
"reverse-dependencies of all the binary packages that "
|
||||||
"the specified source package builds will be listed.")
|
"the specified source package builds will be listed.")
|
||||||
parser.add_option('-r', '--release', metavar='RELEASE',
|
parser.add_option('-r', '--release', metavar='RELEASE',
|
||||||
default=UbuntuDistroInfo().devel(),
|
default=system_distro_info.devel(),
|
||||||
help='Query dependencies in RELEASE. Default: devel')
|
help='Query dependencies in RELEASE. '
|
||||||
|
'Default: %s' % system_distro_info.devel())
|
||||||
parser.add_option('-R', '--without-recommends',
|
parser.add_option('-R', '--without-recommends',
|
||||||
action='store_false', dest='recommends', default=True,
|
action='store_false', dest='recommends', default=True,
|
||||||
help='Only consider Depends relationships, '
|
help='Only consider Depends relationships, '
|
||||||
@ -68,6 +71,14 @@ def main():
|
|||||||
if options.server is not None:
|
if options.server is not None:
|
||||||
opts['server'] = options.server
|
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:
|
try:
|
||||||
data = query_rdepends(package, options.release, options.arch, **opts)
|
data = query_rdepends(package, options.release, options.arch, **opts)
|
||||||
except RDependsException, e:
|
except RDependsException, e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user