mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-26 10:31:19 +00:00
Added check-out mode for britney.py
This commit is contained in:
parent
a3667cb3b1
commit
1768a56d7b
27
britney.py
27
britney.py
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python2.4
|
#!/usr/bin/env python2.4
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2004 Anthony Towns <ajt@debian.org>
|
# Copyright (C) 2001-2008 Anthony Towns <ajt@debian.org>
|
||||||
# Andreas Barth <aba@debian.org>
|
# Andreas Barth <aba@debian.org>
|
||||||
# Fabio Tranchitella <kobold@debian.org>
|
# Fabio Tranchitella <kobold@debian.org>
|
||||||
|
|
||||||
@ -254,10 +254,18 @@ class Britney:
|
|||||||
result = self.get_nuninst(arch, build=True)
|
result = self.get_nuninst(arch, build=True)
|
||||||
nuninst.update(result)
|
nuninst.update(result)
|
||||||
self.__log("> Found %d non-installable packages" % len(nuninst[arch]), type="I")
|
self.__log("> Found %d non-installable packages" % len(nuninst[arch]), type="I")
|
||||||
self.write_nuninst(nuninst)
|
for p in sorted(nuninst[arch]):
|
||||||
|
pkg = self.binaries['testing'][arch][0][p]
|
||||||
|
print "%s %s %s (%s) uninstallable" % (pkg[SOURCE], pkg[SOURCEVER], p, arch)
|
||||||
|
if not self.options.check_out:
|
||||||
|
self.write_nuninst(nuninst)
|
||||||
else:
|
else:
|
||||||
self.__log("Not building the list of not installable packages, as requested", type="I")
|
self.__log("Not building the list of not installable packages, as requested", type="I")
|
||||||
|
|
||||||
|
# if running in check_out.py mode, quit here
|
||||||
|
if self.options.check_out:
|
||||||
|
print ":".join(map(lambda x: '%s-%s' % (x, len(nuninst[x])), self.options.architectures))
|
||||||
|
return
|
||||||
|
|
||||||
# read the source and binary packages for the involved distributions
|
# read the source and binary packages for the involved distributions
|
||||||
self.sources = {'testing': self.read_sources(self.options.testing),
|
self.sources = {'testing': self.read_sources(self.options.testing),
|
||||||
@ -314,10 +322,16 @@ class Britney:
|
|||||||
help="enable control files generation")
|
help="enable control files generation")
|
||||||
self.parser.add_option("", "--nuninst-cache", action="store_true", dest="nuninst_cache", default=False,
|
self.parser.add_option("", "--nuninst-cache", action="store_true", dest="nuninst_cache", default=False,
|
||||||
help="do not build the non-installability status, use the cache from file")
|
help="do not build the non-installability status, use the cache from file")
|
||||||
|
self.parser.add_option("", "--check-out", action="store_true", dest="check_out", default=False,
|
||||||
|
help="compatibility mode with check_out.py")
|
||||||
(self.options, self.args) = self.parser.parse_args()
|
(self.options, self.args) = self.parser.parse_args()
|
||||||
|
|
||||||
|
# integrity checks
|
||||||
|
if self.options.nuninst_cache and self.options.check_out:
|
||||||
|
exit.__log("nuninst_cache and check_out are mutually exclusive!", type="E")
|
||||||
|
sys.exit(1)
|
||||||
# if the configuration file exists, than read it and set the additional options
|
# if the configuration file exists, than read it and set the additional options
|
||||||
if not os.path.isfile(self.options.config):
|
elif not os.path.isfile(self.options.config):
|
||||||
self.__log("Unable to read the configuration file (%s), exiting!" % self.options.config, type="E")
|
self.__log("Unable to read the configuration file (%s), exiting!" % self.options.config, type="E")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@ -2695,8 +2709,11 @@ class Britney:
|
|||||||
This is the entry point for the class: it includes the list of calls
|
This is the entry point for the class: it includes the list of calls
|
||||||
for the member methods which will produce the output files.
|
for the member methods which will produce the output files.
|
||||||
"""
|
"""
|
||||||
|
# if running in check_out.py mode, quit
|
||||||
|
if self.options.check_out:
|
||||||
|
return
|
||||||
# if no actions are provided, build the excuses and sort them
|
# if no actions are provided, build the excuses and sort them
|
||||||
if not self.options.actions:
|
elif not self.options.actions:
|
||||||
self.write_excuses()
|
self.write_excuses()
|
||||||
if not self.options.compatible:
|
if not self.options.compatible:
|
||||||
self.sort_actions()
|
self.sort_actions()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user