mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
britney: Print the current package to stderr when AIEEEing.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
This commit is contained in:
parent
5a998ea8a7
commit
47c808309b
14
britney.py
14
britney.py
@ -2093,7 +2093,7 @@ class Britney(object):
|
||||
nuninst_arch = None
|
||||
if not (skip_archall and binaries[arch][0][p][ARCHITECTURE] == 'all'):
|
||||
nuninst_arch = nuninst[arch]
|
||||
self._installability_test(systems[arch], p, broken, to_check, nuninst_arch)
|
||||
self._installability_test(systems[arch], p, broken, to_check, nuninst_arch, pkg)
|
||||
|
||||
# broken packages (second round, reverse dependencies of the first round)
|
||||
while to_check:
|
||||
@ -2105,7 +2105,7 @@ class Britney(object):
|
||||
nuninst_arch = None
|
||||
if not (skip_archall and binaries[arch][0][p][ARCHITECTURE] == 'all'):
|
||||
nuninst_arch = nuninst[arch]
|
||||
self._installability_test(systems[arch], p, broken, to_check, nuninst_arch)
|
||||
self._installability_test(systems[arch], p, broken, to_check, nuninst_arch, pkg)
|
||||
|
||||
# if we are processing hints, go ahead
|
||||
if hint:
|
||||
@ -2721,7 +2721,7 @@ class Britney(object):
|
||||
|
||||
self.__output.close()
|
||||
|
||||
def _installability_test(self, system, p, broken, to_check, nuninst_arch):
|
||||
def _installability_test(self, system, p, broken, to_check, nuninst_arch, current_pkg):
|
||||
"""Test for installability of a package on an architecture
|
||||
|
||||
p is the package to check and system does the actual check.
|
||||
@ -2733,9 +2733,15 @@ class Britney(object):
|
||||
|
||||
If nuninst_arch is not None then it also updated in the same
|
||||
way as broken is.
|
||||
|
||||
current_pkg is the package currently being tried, mainly used
|
||||
to print where an AIEEE is coming from.
|
||||
"""
|
||||
r = system.is_installable(p)
|
||||
if not r:
|
||||
if r <= 0:
|
||||
# AIEEE: print who's responsible for it
|
||||
if r == -1:
|
||||
sys.stderr.write("AIEEE triggered by: %s\n" % current_pkg)
|
||||
# not installable
|
||||
if p not in broken:
|
||||
broken.add(p)
|
||||
|
@ -46,9 +46,10 @@ static void dpkgpackages_dealloc(dpkgpackages *self) {
|
||||
static PyObject *dpkgpackages_isinstallable(dpkgpackages *self, PyObject *args)
|
||||
{
|
||||
char *pkgname;
|
||||
int r;
|
||||
if (!PyArg_ParseTuple(args, "s", &pkgname)) return NULL;
|
||||
if (checkinstallable2(self->pkgs, pkgname)) {
|
||||
return Py_BuildValue("i", 1);
|
||||
if ((r=checkinstallable2(self->pkgs, pkgname))) {
|
||||
return Py_BuildValue("i", r);
|
||||
} else {
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
@ -909,7 +909,8 @@ static int checkinstallable(dpkg_packages *pkgs, collpackagelist *instoneof) {
|
||||
}
|
||||
fprintf(stderr, ".\n");
|
||||
free_instonelist(list);
|
||||
return 0;
|
||||
/* let the caller know we hit a bad failure */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pointer == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user