[tahoe-dev] [tahoe-lafs] #745: Debian package: Missing dependency on Debian/etch
tahoe-lafs
trac at allmydata.org
Thu Jul 2 19:23:29 PDT 2009
#745: Debian package: Missing dependency on Debian/etch
------------------------------+---------------------------------------------
Reporter: [4-tea-2] | Owner: warner
Type: defect | Status: new
Priority: major | Milestone: 1.5.0
Component: packaging | Version: 1.4.1
Keywords: debian,packaging | Launchpad_bug:
------------------------------+---------------------------------------------
Comment(by warner):
Ok, I think I understand this better now.
* debian/etch ships with python2.4 as the standard /usr/bin/python
(http://packages.debian.org/etch/python).
* our most recent tahoe .deb for etch
(http://allmydata.org/debian/dists/etch/tahoe/binary-i386/allmydata-
tahoe_1.4.1-r3916_all.deb)
was built on an Etch system with python2.4
* therefore its {{{_auto_deps.py}}} correctly declares a requirement on
pysqlite, enforced at runtime, via the call to
{{{require_auto_deps()}}}
in {{{src/allmydata/__init__.py}}}
* the .deb's .egg-info/requires.txt correctly includes a line which
requires {{{pysqlite >= 2.0.5}}}, which will probably be enforced by
anything that goes poking around .egg-info . In particular, the code
that
was added to src/allmydata/scripts/runner.py (the main CLI entry
point)
to call {{{pkg_requires.require('allmydata-tahoe')}}} will read the
.egg-info data and enforce its requirements.
* however, the packaging (i.e. debian/control) does not declare this
requirement. This is a bug. Installing just this .deb (and no extra
non-Depends-required packages) and then running the supplied
/usr/bin/tahoe with python2.4 should fail with the same sort of
exception
displayed, because {{{_auto_deps.py}}} insists on having pysqlite, but
APT
did not know that python-pysqlite2 should have been installed.
* But, 4-tea-2 appears to be using python2.5 to start the Tahoe node on
this
etch system, because the traceback listed above shows
{{{/usr/lib/python2.5/site-packages}}}. Etch includes a python2.5
package
(http://packages.debian.org/etch/python2.5), but it does not touch
/usr/bin/python, so either 4-tea-2 has set up a symlink or installed
python2.5 outside the awareness of APT (perhaps directly to
/usr/local/bin). This is what was confusing me.
* the .deb provides an allmydata_tahoe-1.4.1_r3916-py2.4.egg-info/
directory, and does not provide any .egg-info data for python2.5 . I
don't know how setuptools reacts to this: would it refuse to believe
that
tahoe was actually installed when run under py2.5? If so, then I'm
still
confused as to where 4-tea-2's tahoe was finding the .egg-info data.
* when run under python2.5, the code in {{{_auto_deps.py}}} should *not*
require pysqlite
* however the .egg-info line (generated on our Etch buildslave) still
requires it, and thus the scripts/runner.py call will demand it.
Why is that {{{pkg_resources.require('allmydata-tahoe')}}} line there? If
it
weren't, then the correct runtime-computed dependencies in _auto_deps.py
would be enforced, and the incorrect package-build-time dependencies in
.egg-info/requires.txt would not.
Now, it happens that the .deb packaging for this is incorrect, and the
Etch
.deb should declare a dependency on python-sqlite2 because that's needed
by
the default version of python on an Etch system, and it happens that
fixing
the packaging would also happen to make this problem go away. But it's
still
wrong: this is a dependency that changes depending upon the version of
Python
used to run bin/tahoe, and recording the value that was computed at
package-build time seems inappropriate. It should be possible to run tahoe
under py2.5 on this system without having pysqlite installed.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/745#comment:12>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list