Hi there Julian and Bert:

Thank you for packaging Tahoe-LAFS! This note is mostly just for your
information--it doesn't necessarily mean that the current proposed
patch needs to be changed.

This situation is complicated by the fact that the packaging of
Twisted upstream has only a single package ("Twisted") but the
packaging in Debian (and some other distributions) has several
packages ("Twisted-Core", "Twisted-Web", etc.).

(As an historical note, this started when the upstream Twisted project
broke itself up into multiple packages and Debian packaged them
separately. Then the upstream Twisted project abandoned that idea and
went back to a single monolithic package, but Debian did not follow
suit.)

Now there are three layers of dependency management that we have to
keep in mind in order to reduce twisted dependencies successfully.

First is, of course, the Debian layer -- the "Depends:" line in
debian/control. That one currently says that it depends on
"python-twisted". This could (if the other two layers are also
changed) be reduced to depending on "python-twisted-core",
"python-twisted-web", and optionally "python-twisted-conch". The
optional character of the dependency on python-twisted-conch is that
it is needed only if the user is going to run an SFTP server. (Note
that SFTP server plus sshfs is the way to have FUSE integration, which
many users want.) There are two other dependencies that are present
only for the SFTP server: PyCrypto and pyasn1.

Second layer of dependency management is the Python packaging system.
Tahoe-LAFS has a file of Python packaging metadata named
allmydata_tahoe.egg-info/requires.txt which contains a list of other
Python dependencies. This file is built automatically at build-time,
based on the contents of
http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/_auto_deps.py?annotate=blame&rev=4976
.

This sort of .egg-info file is the standard Python way to express
dependencies in a machine-parseable format. There may be other tools
which parse that file for their own purposes, and certainly Tahoe-LAFS
itself does for the third layer of dependency management:

Third layer of dependency management is Tahoe-LAFS itself. At startup
time it asserts that the dependencies from the Python packaging
metadata are satisfied (using the pkg_resources tool) as well as
imports each Python module that it depends on and checks the
"__version__" attribute of each module:
http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/__init__.py?annotate=blame&rev=5042#L346
.

As far as upstream Tahoe-LAFS goes we cannot depend on the specific
Twisted sub-packages like "Twisted-Web" because they are not
distributed individually by upstream Twisted and therefore in many
installations there is no "Twisted-Web.egg-info" file for the
pkg_resources to use to determine that the dependency on "Twisted-Web"
is satisfied.

As far as upstream Tahoe-LAFS goes, we decided to have an
unconditional dependency on the SFTP-related packages: PyCrypto and
pyasn1, and would also have included an unconditional dependency on
Conch if it were not already bundled into the Twisted package. This is
because we don't want our users to have to manually install
dependencies.

Regards,

Zooko



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to