[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Fwd: python-apt for Hurd]

On Wed, 2011-01-19 at 01:53 +0100, Pino Toscano wrote:
> Hi,
> Alle martedì 18 gennaio 2011, Svante Signell ha scritto:
> > I was wondering if somebody on the list could help explaining the
> > problem of running the tests of python-apt under Hurd. This report
> > was allocated Debian bug number 610448. Are there any inherent
> > problems with file/directory locking in Hurd?
> Yes, there are. I just sent a message to the bug, explaining shortly the 
> issue (ours), and a fix in the python-apt packaging that could help us 
> to build it without the test suite (until the file locking is not 
> fixed).

I took a look into the build problem and found out that the best way
should be to just remove the two failing files test_progress.py and
test_apt_cache.py for Hurd from the tests directory. The second best
would be to modify the override_dh_auto_test target in the
debian/rules file, like the diff inlined below created by diff -u
rules.old  rules > fix-gnu-hurd-tests.diff

--- rules.old   2010-10-22 10:47:37.000000000 +0200
+++ rules       2011-01-20 00:44:58.000000000 +0100
@@ -29,9 +29,14 @@
        dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/*
-       set -e; for python in $(shell pyversions -r); do \
+# Tests including file locking fails on hurd_i386.
+       if [ $(DEB_BUILD_ARCH) = hurd_i386 ]; then \
+               set -e; echo "Not doing tests under Hurd"; \
+       else \
+               set -e; for python in $(shell pyversions -r); do \
                $$python tests/test_all.py -q; \
-       done;
+               done; \
+       fi

(Looks like the some of the tabs in the file have disappeared, sorry)

Modifying rules this way completely disables the tests under Hurd until
the file locking problem is solved, but is building the .debs properly.
I even tried to create a patch by cresting a patches directory and add a
patch there, but that will be for later, I'm not yet fluent in creating,
modifying or patching Debian packages.

However, I did some studies on how to create a patch but was confused by
which tool to use, dpatch or quilt, package file format version etc. It
looks like the source format 3.0 (quilt) is not used for python-apt but
how to figure it out? No patches directory is present under the debian/

Reply to: