diff --git a/check-mir b/check-mir index aad9f8b..dac85bf 100755 --- a/check-mir +++ b/check-mir @@ -39,7 +39,7 @@ def check_support(pkgname, alt=False): try: pkg = apt_cache[pkgname] except KeyError: - print >> sys.stderr, pkgname, 'does not exist (pure virtual?)' + print >> sys.stderr, prefix, 'does not exist (pure virtual?)' return False section = pkg.candidate.section @@ -95,7 +95,29 @@ for field in ('Build-Depends', 'Build-Depends-Indep'): else: any_unsupported = True +print '\nChecking support status of binary dependencies...' +while True: + try: + control.next() + except StopIteration: + break + + for field in ('Depends', 'Pre-Depends', 'Recommends'): + if field not in control.section: + continue + for or_group in apt.apt_pkg.parse_depends(control.section[field]): + pkgname = or_group[0][0] + if pkgname.startswith('$'): + continue + if not check_support(pkgname): + # check non-preferred alternatives + for altpkg in or_group[1:]: + if check_support(altpkg[0], alt=True): + break + else: + any_unsupported = True + if any_unsupported: print '\nPlease check https://wiki.ubuntu.com/MainInclusionProcess if this source package needs to get into in main/restricted, or reconsider if the package really needs above dependencies.' else: - print 'All build dependencies are supported in main or restricted.' + print 'All dependencies are supported in main or restricted.' diff --git a/debian/changelog b/debian/changelog index a96996e..d99f313 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ubuntu-dev-tools (0.110) UNRELEASED; urgency=low * doc/check-mir.1: Fix typo. + * check-mir: Check binary dependencies, too. -- Martin Pitt Thu, 13 Jan 2011 19:24:07 -0600