mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-13 03:11:15 +00:00
Remove all trailing tabs.
This commit is contained in:
parent
1943df29eb
commit
100ba7d1b5
38
404main
38
404main
@ -32,7 +32,7 @@ import apt
|
||||
|
||||
def process_deps(cache, deps):
|
||||
"""Takes a list of (build) dependencies and processes it."""
|
||||
|
||||
|
||||
for basedep in [d.or_dependencies[0] for d in deps]:
|
||||
if not packages.has_key(basedep.name) and basedep.name != '':
|
||||
# Check the (build) dependencies recursively
|
||||
@ -62,15 +62,15 @@ def comp_type_deb(op):
|
||||
def find_main(cache, pack):
|
||||
"""Searches the dependencies and build dependencies of a package recursively
|
||||
to determine if they are all in the 'main' component or not."""
|
||||
|
||||
|
||||
global packages
|
||||
|
||||
|
||||
if pack in packages:
|
||||
return
|
||||
|
||||
# Retrieve information about the package
|
||||
version = get_package_version(cache, distro, pack)
|
||||
|
||||
|
||||
if not version:
|
||||
packages[pack] = False
|
||||
return
|
||||
@ -80,10 +80,10 @@ def find_main(cache, pack):
|
||||
else:
|
||||
if not packages.has_key(pack):
|
||||
packages[pack] = False
|
||||
|
||||
|
||||
# Retrieve package dependencies
|
||||
process_deps(cache, version.dependencies)
|
||||
|
||||
|
||||
# Retrieve package build dependencies. There's no handy
|
||||
# attribute on version for this, so unfortunately we have to
|
||||
# do a lot of messing about with apt.
|
||||
@ -101,19 +101,19 @@ def find_main(cache, pack):
|
||||
for (name, ver, op) in or_deps:
|
||||
base_deps.append(apt.package.BaseDependency(name, op, ver, False))
|
||||
deps.append(apt.package.Dependency(base_deps))
|
||||
|
||||
|
||||
process_deps(cache, deps)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
|
||||
global packages, distro
|
||||
|
||||
|
||||
# Check if the amount of arguments is correct
|
||||
if len(sys.argv) < 2 or len(sys.argv) > 3 or sys.argv[1] in ('help', '-h', '--help'):
|
||||
print 'Usage: %s <package name> [<distribution>]' % sys.argv[0]
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
cache = apt.cache.Cache()
|
||||
|
||||
if len(sys.argv) == 3 and sys.argv[2]:
|
||||
@ -124,36 +124,36 @@ def main():
|
||||
sys.exit(1)
|
||||
else:
|
||||
distro = subprocess.Popen(['lsb_release', '-cs'], stdout=subprocess.PIPE).stdout.read().strip('\n')
|
||||
|
||||
|
||||
if not get_package_version(cache, distro, sys.argv[1]):
|
||||
print 'Can\'t find package «%s» in distribution «%s».' % (sys.argv[1], distro)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
print 'Checking package «%s» in distribution «%s»...' % (sys.argv[1], distro)
|
||||
|
||||
|
||||
find_main(cache, sys.argv[1])
|
||||
|
||||
|
||||
# True if everything checked until the point is in main
|
||||
all_in_main = True
|
||||
|
||||
|
||||
for package in packages:
|
||||
if not packages[package]:
|
||||
if all_in_main:
|
||||
print 'The following packages aren\'t in main:'
|
||||
all_in_main = False
|
||||
print ' ', package
|
||||
|
||||
|
||||
if all_in_main:
|
||||
print 'Package «%s» and all its dependencies and build dependencies are in main.' % sys.argv[1]
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
||||
# Global variable to hold the status of all packages
|
||||
packages = {}
|
||||
|
||||
|
||||
# Global variable to hold the target distribution
|
||||
distro = ''
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
|
2
ack-sync
2
ack-sync
@ -256,7 +256,7 @@ def main(bug_numbers, all_package, all_version, all_section, update,
|
||||
subprocess.check_call(["dpkg-source", "-x", dsc_file], env=env)
|
||||
|
||||
build_source(dist, dsc_file)
|
||||
|
||||
|
||||
if piuparts:
|
||||
test_install(dist, dsc_file)
|
||||
|
||||
|
@ -37,7 +37,7 @@ then
|
||||
#########################################################
|
||||
# Install the dependencies for the source package the
|
||||
# user is working on.
|
||||
|
||||
|
||||
if [ -f ../debian/control ]; then
|
||||
cd ..
|
||||
elif [ ! -f ./debian/control ]; then
|
||||
@ -48,17 +48,17 @@ package(s) whose build dependencies you want to install in order \
|
||||
to use this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
filepath="`pwd`/debian/control"
|
||||
missing_dependencies=$(dpkg-checkbuilddeps 2>&1)
|
||||
|
||||
|
||||
if [ -z "$missing_dependencies" ]; then
|
||||
echo "The build dependencies described in «$filepath» are already satisfied."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
echo "Installing the build dependencies described in «$filepath»..."
|
||||
|
||||
|
||||
if [ -x /usr/lib/pbuilder/pbuilder-satisfydepends ]
|
||||
then
|
||||
sudo /usr/lib/pbuilder/pbuilder-satisfydepends
|
||||
|
@ -519,7 +519,7 @@ EOM
|
||||
btrfs-source-subvolume=CHROOT_PATH
|
||||
btrfs-snapshot-directory=CHROOT_SNAPSHOT_DIR
|
||||
EOM
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -z "$personality" ]; then
|
||||
|
@ -126,7 +126,7 @@ sub getDSC {
|
||||
|
||||
}
|
||||
|
||||
my @vers = reverse sort AptPkg::Version::CmpVersion keys %urls;
|
||||
my @vers = reverse sort AptPkg::Version::CmpVersion keys %urls;
|
||||
|
||||
return $urls{$vers[0]} or die("Unable To Find Source Package On Madison\n");
|
||||
|
||||
|
@ -139,7 +139,7 @@ class BaseWrapper(object):
|
||||
return fetch(data)
|
||||
else:
|
||||
raise NotImplementedError("Don't know how to fetch '%s' from LP" % str(data))
|
||||
|
||||
|
||||
def __call__(self):
|
||||
return self._lpobject
|
||||
|
||||
|
@ -123,7 +123,7 @@ def needSponsorship(name, component, release):
|
||||
Ask the user if he has upload permissions for the package or the
|
||||
component.
|
||||
'''
|
||||
|
||||
|
||||
while True:
|
||||
print "Do you have upload permissions for the '%s' component " \
|
||||
"or the package '%s' in Ubuntu %s?" % (component, name, release)
|
||||
@ -166,7 +166,7 @@ def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
|
||||
done
|
||||
|
||||
%s''' % (status, subscribe, bugtext)
|
||||
|
||||
|
||||
# prepare sign command
|
||||
gpg_command = None
|
||||
for cmd in ('gpg', 'gpg2', 'gnome-gpg'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user