Alle giovedì 20 gennaio 2011, Julian Andres Klode ha scritto: > On Mi, 2011-01-19 at 01:50 +0100, Pino Toscano wrote: > > Hi, > > > > Alle martedì 18 gennaio 2011, Svante Signell ha scritto: > > > I managed to compile 0.7.100.1 from source with the exception of > > > two failed tests, see below. Removing these tests (as a > > > workaround) made the package to be created. Installing that > > > package made > > > apt-listchanges functional (as far as I can see). Looks like > > > there is a problem with file/directory locking, is it lacking > > > somehow in the Hurd? > > > > Yes, the file locking implementation is quit suboptimal (known > > issue, it affects other software as well), and in this current > > case it cannot cope with a new lock set over an existing one > > (which is allowed and should succeed). > > So, is there a way to get it work? I don't see how the file is > already locked.
The actual locking function is in apt/apt-pkg/contrib/fileutl.cc, called GetLock() [*]. All start from python-apt/apt/cache.py, Cache.update(): - the first lock is easy: - the explicit apt_pkg.get_lock() call, implemented in python-apt/python/apt_pkgmodule.cc, GetLock() - GetLock() calls GetLock[*] - the second lock is more hidden: - some lines down in Cache.update(), there is a call to self._cache.update(), implemented in python-apt/python/cache.cc, PkgCacheUpdate() - in PkgCacheUpdate() there's a call to ListUpdate(), implemented in apt/apt-pkg/algorithms.cc - in ListUpdate() a pkgAcquire object is created (using the empty constructor), and its Setup() method (implemented in apt/apt-pkg/acquire.cc) is called - in pkgAcquire::Setup(), there's a call to GetLock[*] > > Samuel Thibault (hurd-i386 buildd maintainer) tried to build > > python-apt with 'nocheck' in DEB_BUILD_OPTIONS, but it does not > > honors this option; if implemented, Samuel could build it > > disabling the test suite. Could you please fix it? > > After Squeeze. But I'd like to fix the problem without disabling > tests on hurd. In the meantime, try rebuilding with Debug::NoLocking > set to true in apt.conf. With the above configuration for apt, the build succeeds (and all the tests pass for py2.5, py2.6 an py3.1). Anyway, attached there is a patch to respect "nocheck" in DEB_BUILD_OPTIONS (recommended by the policy). -- Pino Toscano
--- a/debian/rules +++ b/debian/rules @@ -29,9 +29,13 @@ dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv override_dh_auto_test: +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) set -e; for python in $(shell pyversions -r); do \ $$python tests/test_all.py -q; \ done; +else + echo "tests disabled" +endif override_dh_python2: dh_python2 -N python-apt-common
signature.asc
Description: This is a digitally signed message part.