mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
Check for dependencies that the package doesn't Depend on. Recommend
dput, lintian, patch, quilt. (LP: #846385)
This commit is contained in:
parent
948032d8a3
commit
30da459114
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -7,6 +7,8 @@ ubuntu-dev-tools (0.139) UNRELEASED; urgency=low
|
||||
- Determine the task from the UDD branch.
|
||||
- Support syncs of new packages.
|
||||
- Support syncs from a non-default series (LP: #931644)
|
||||
- Check for dependencies that the package doesn't Depend on. Recommend
|
||||
dput, lintian, patch, quilt. (LP: #846385)
|
||||
* Re-add dgetlp. Still needed for downloading source packages from +queue.
|
||||
(LP: #919805)
|
||||
* pbuilder-dist: Export DISTRIBUTION and ARCHITECTURE as well as DIST and
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -53,13 +53,17 @@ Recommends: bzr,
|
||||
debian-archive-keyring,
|
||||
debian-keyring,
|
||||
debootstrap,
|
||||
dput,
|
||||
genisoimage,
|
||||
lintian,
|
||||
libwww-perl,
|
||||
pbuilder | cowdancer | sbuild,
|
||||
patch,
|
||||
perl-modules,
|
||||
python-dns,
|
||||
python-gnupginterface,
|
||||
python-soappy,
|
||||
quilt,
|
||||
reportbug (>= 3.39ubuntu1)
|
||||
Suggests: ipython, python-simplejson | python (>= 2.7), qemu-user-static
|
||||
Description: useful tools for Ubuntu developers
|
||||
|
@ -24,7 +24,8 @@ from devscripts.logger import Logger
|
||||
|
||||
from ubuntutools.config import UDTConfig
|
||||
from ubuntutools.builder import get_builder
|
||||
from ubuntutools.sponsor_patch.sponsor_patch import sponsor_patch
|
||||
from ubuntutools.sponsor_patch.sponsor_patch import (sponsor_patch,
|
||||
check_dependencies)
|
||||
|
||||
def parse(script_name):
|
||||
"""Parse the command line parameters."""
|
||||
@ -65,6 +66,7 @@ def parse(script_name):
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
Logger.set_verbosity(options.verbose)
|
||||
check_dependencies()
|
||||
|
||||
if len(args) == 0:
|
||||
Logger.error("No bug number specified.")
|
||||
|
@ -35,6 +35,31 @@ from ubuntutools.sponsor_patch.patch import Patch
|
||||
from ubuntutools.sponsor_patch.question import ask_for_manual_fixing
|
||||
from ubuntutools.sponsor_patch.source_package import SourcePackage
|
||||
|
||||
|
||||
def is_command_available(command):
|
||||
"Is command in $PATH?"
|
||||
path = os.environ.get('PATH', '/usr/bin:/bin')
|
||||
return any(os.access(os.path.join(directory, command), os.X_OK)
|
||||
for directory in path.split(':'))
|
||||
|
||||
|
||||
def check_dependencies():
|
||||
"Do we have all the commands we need for full functionality?"
|
||||
missing = []
|
||||
for cmd in ('patch', 'bzr', 'quilt', 'dput', 'lintian'):
|
||||
if not is_command_available(cmd):
|
||||
missing.append(cmd)
|
||||
if not is_command_available('bzr-buildpackage'):
|
||||
missing.append('bzr-builddeb')
|
||||
if not any(is_command_available(cmd)
|
||||
for cmd in ('pbuilder', 'sbuild', 'cowbuilder')):
|
||||
missing.append('pbuilder/cowbuilder/sbuild')
|
||||
|
||||
if missing:
|
||||
Logger.warn("sponsor-patch requires %s to be installed for full "
|
||||
"functionality", ', '.join(missing))
|
||||
|
||||
|
||||
def get_source_package_name(bug_task):
|
||||
package = None
|
||||
if bug_task.bug_target_name != "ubuntu":
|
||||
|
Loading…
x
Reference in New Issue
Block a user