Remove all trailing tabs.

This commit is contained in:
Benjamin Drung 2010-12-03 00:10:41 +01:00
parent 1943df29eb
commit 100ba7d1b5
7 changed files with 30 additions and 30 deletions

38
404main
View File

@ -32,7 +32,7 @@ import apt
def process_deps(cache, deps): def process_deps(cache, deps):
"""Takes a list of (build) dependencies and processes it.""" """Takes a list of (build) dependencies and processes it."""
for basedep in [d.or_dependencies[0] for d in deps]: for basedep in [d.or_dependencies[0] for d in deps]:
if not packages.has_key(basedep.name) and basedep.name != '': if not packages.has_key(basedep.name) and basedep.name != '':
# Check the (build) dependencies recursively # Check the (build) dependencies recursively
@ -62,15 +62,15 @@ def comp_type_deb(op):
def find_main(cache, pack): def find_main(cache, pack):
"""Searches the dependencies and build dependencies of a package recursively """Searches the dependencies and build dependencies of a package recursively
to determine if they are all in the 'main' component or not.""" to determine if they are all in the 'main' component or not."""
global packages global packages
if pack in packages: if pack in packages:
return return
# Retrieve information about the package # Retrieve information about the package
version = get_package_version(cache, distro, pack) version = get_package_version(cache, distro, pack)
if not version: if not version:
packages[pack] = False packages[pack] = False
return return
@ -80,10 +80,10 @@ def find_main(cache, pack):
else: else:
if not packages.has_key(pack): if not packages.has_key(pack):
packages[pack] = False packages[pack] = False
# Retrieve package dependencies # Retrieve package dependencies
process_deps(cache, version.dependencies) process_deps(cache, version.dependencies)
# Retrieve package build dependencies. There's no handy # Retrieve package build dependencies. There's no handy
# attribute on version for this, so unfortunately we have to # attribute on version for this, so unfortunately we have to
# do a lot of messing about with apt. # do a lot of messing about with apt.
@ -101,19 +101,19 @@ def find_main(cache, pack):
for (name, ver, op) in or_deps: for (name, ver, op) in or_deps:
base_deps.append(apt.package.BaseDependency(name, op, ver, False)) base_deps.append(apt.package.BaseDependency(name, op, ver, False))
deps.append(apt.package.Dependency(base_deps)) deps.append(apt.package.Dependency(base_deps))
process_deps(cache, deps) process_deps(cache, deps)
def main(): def main():
global packages, distro global packages, distro
# Check if the amount of arguments is correct # 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'): 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] print 'Usage: %s <package name> [<distribution>]' % sys.argv[0]
sys.exit(1) sys.exit(1)
cache = apt.cache.Cache() cache = apt.cache.Cache()
if len(sys.argv) == 3 and sys.argv[2]: if len(sys.argv) == 3 and sys.argv[2]:
@ -124,36 +124,36 @@ def main():
sys.exit(1) sys.exit(1)
else: else:
distro = subprocess.Popen(['lsb_release', '-cs'], stdout=subprocess.PIPE).stdout.read().strip('\n') distro = subprocess.Popen(['lsb_release', '-cs'], stdout=subprocess.PIPE).stdout.read().strip('\n')
if not get_package_version(cache, distro, sys.argv[1]): if not get_package_version(cache, distro, sys.argv[1]):
print 'Can\'t find package «%s» in distribution «%s».' % (sys.argv[1], distro) print 'Can\'t find package «%s» in distribution «%s».' % (sys.argv[1], distro)
sys.exit(1) sys.exit(1)
print 'Checking package «%s» in distribution «%s»...' % (sys.argv[1], distro) print 'Checking package «%s» in distribution «%s»...' % (sys.argv[1], distro)
find_main(cache, sys.argv[1]) find_main(cache, sys.argv[1])
# True if everything checked until the point is in main # True if everything checked until the point is in main
all_in_main = True all_in_main = True
for package in packages: for package in packages:
if not packages[package]: if not packages[package]:
if all_in_main: if all_in_main:
print 'The following packages aren\'t in main:' print 'The following packages aren\'t in main:'
all_in_main = False all_in_main = False
print ' ', package print ' ', package
if all_in_main: if all_in_main:
print 'Package «%s» and all its dependencies and build dependencies are in main.' % sys.argv[1] print 'Package «%s» and all its dependencies and build dependencies are in main.' % sys.argv[1]
if __name__ == '__main__': if __name__ == '__main__':
# Global variable to hold the status of all packages # Global variable to hold the status of all packages
packages = {} packages = {}
# Global variable to hold the target distribution # Global variable to hold the target distribution
distro = '' distro = ''
try: try:
main() main()
except KeyboardInterrupt: except KeyboardInterrupt:

View File

@ -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) subprocess.check_call(["dpkg-source", "-x", dsc_file], env=env)
build_source(dist, dsc_file) build_source(dist, dsc_file)
if piuparts: if piuparts:
test_install(dist, dsc_file) test_install(dist, dsc_file)

View File

@ -37,7 +37,7 @@ then
######################################################### #########################################################
# Install the dependencies for the source package the # Install the dependencies for the source package the
# user is working on. # user is working on.
if [ -f ../debian/control ]; then if [ -f ../debian/control ]; then
cd .. cd ..
elif [ ! -f ./debian/control ]; then elif [ ! -f ./debian/control ]; then
@ -48,17 +48,17 @@ package(s) whose build dependencies you want to install in order \
to use this script." to use this script."
exit 1 exit 1
fi fi
filepath="`pwd`/debian/control" filepath="`pwd`/debian/control"
missing_dependencies=$(dpkg-checkbuilddeps 2>&1) missing_dependencies=$(dpkg-checkbuilddeps 2>&1)
if [ -z "$missing_dependencies" ]; then if [ -z "$missing_dependencies" ]; then
echo "The build dependencies described in «$filepath» are already satisfied." echo "The build dependencies described in «$filepath» are already satisfied."
exit 0 exit 0
fi fi
echo "Installing the build dependencies described in «$filepath»..." echo "Installing the build dependencies described in «$filepath»..."
if [ -x /usr/lib/pbuilder/pbuilder-satisfydepends ] if [ -x /usr/lib/pbuilder/pbuilder-satisfydepends ]
then then
sudo /usr/lib/pbuilder/pbuilder-satisfydepends sudo /usr/lib/pbuilder/pbuilder-satisfydepends

View File

@ -519,7 +519,7 @@ EOM
btrfs-source-subvolume=CHROOT_PATH btrfs-source-subvolume=CHROOT_PATH
btrfs-snapshot-directory=CHROOT_SNAPSHOT_DIR btrfs-snapshot-directory=CHROOT_SNAPSHOT_DIR
EOM EOM
;; ;;
esac esac
fi fi
if [ ! -z "$personality" ]; then if [ ! -z "$personality" ]; then

View File

@ -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"); return $urls{$vers[0]} or die("Unable To Find Source Package On Madison\n");

View File

@ -139,7 +139,7 @@ class BaseWrapper(object):
return fetch(data) return fetch(data)
else: else:
raise NotImplementedError("Don't know how to fetch '%s' from LP" % str(data)) raise NotImplementedError("Don't know how to fetch '%s' from LP" % str(data))
def __call__(self): def __call__(self):
return self._lpobject return self._lpobject

View File

@ -123,7 +123,7 @@ def needSponsorship(name, component, release):
Ask the user if he has upload permissions for the package or the Ask the user if he has upload permissions for the package or the
component. component.
''' '''
while True: while True:
print "Do you have upload permissions for the '%s' component " \ print "Do you have upload permissions for the '%s' component " \
"or the package '%s' in Ubuntu %s?" % (component, name, release) "or the package '%s' in Ubuntu %s?" % (component, name, release)
@ -166,7 +166,7 @@ def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
done done
%s''' % (status, subscribe, bugtext) %s''' % (status, subscribe, bugtext)
# prepare sign command # prepare sign command
gpg_command = None gpg_command = None
for cmd in ('gpg', 'gpg2', 'gnome-gpg'): for cmd in ('gpg', 'gpg2', 'gnome-gpg'):