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

Rewriting the perl support for cross-compiling in Debian



I'm currently rewriting the perl support for cross-compiling in
Debian with two main aims:

1. Close some really, really, old bug reports against dpkg-cross

2. Stop calling `apt-cache` and use AptPkg::* instead via
'NorthernCross' - an unreleased cross-compiling support script
developed for Emdebian by Alexander Shishkin. The NorthernCross code
has been extensively modified to work *within* apt-cross, so the
resulting code is currently named AptCross::*.

(all scripts and packages concerned are Debian native.)

IMHO, libaptpkg-perl isn't an easy module to use, so part of this is to
make the perl bindings to apt-cache easier to understand by putting a
Class::Struct frontend onto AptPkg::*. Although the emphasis is
principally on cross-compiling, the new code will need to be able to
handle native apt-cache data too because one of the tasks is to detect
when a cross-compiled package in repository A is out of date compared to
the upstream Debian version in mirror B. However, I would not consider
AptCross::* to be suitable as a direct dependency of other perl scripts
in Debian that may use apt but which have no relevance to
cross-compilation. If the AptCross::* source code helps those scripts
use AptPkg::* in their own source then that would be fine by me.
:-)

Overall, as long as the eventual names *all* clearly demarcate the new
code as related to cross-compilation in the package (perl module)
names, I'll be happy.

The packages concerned are:

dpkg-cross : Currently provides dpkg-cross.pl which is to be replaced by
Debian::DpkgCross. This involved a substantial rewriting of the
dpkg-cross code and a pre-release (or two) will be made to experimental
to iron out problems and identify any regressions. (Should this be
notified via d-d-announce when 1.99+2.0.0pre1 is uploaded?)

apt-cross  : Extensively modified code from NorthernCross (unreleased)
creating three new perl modules, AptCross::Cache, AptCross::Config and
AptCross::Package which are built on AptPkg::Config, AptPkg::System,
AptPkg::Cache and AptPkg::Source from libapt-pkg-perl. The AptCross::*
modules will then form a new Debian package built from the current
apt-cross source maybe something like libaptcross-perl. 

emdebian-tools : To use the new AptCross:: modules instead of calling
apt-cross/apt-cache direct.

So my question: Are there better names for these? I couldn't find any
guidelines on Debian native perl module names in the Debian Perl Policy
and perldoc is quite vague.

Should I have:
Debian::AptCross::foo and libdebian-aptcross-perl ?

Should dpkg-cross provide DpkgCross::foo and libdpkgcross-perl?

It does seem strange to have dpkg-cross under the Debian:: root and
apt-cross under a new root in the perl hierarchy but then
emdebian-tools also provides a perl module as Emdebian::Tools.
(AptPkg::* is under /usr/lib/perl5/)

All code is currently unreleased and many changes are still incomplete
so all names are up for grabs.

You can see dpkg-cross CVS at alioth [0] and apt-cross SVN at emdebian
[1] (AptCross::Package is currently being written and will basically
be a home for some existing apt-cross code to make it available to
other tools).

dpkg-cross changes will form a 2.0.0 release (currently a 1.99
+2.0.0pre1 version is in preparation in CVS and will be uploaded to
NEW, destined for experimental, soon).

apt-cross changes will form the 0.3.0 release once dpkg-cross 2.0.0 is
ready to leave experimental and this will trigger a 0.4.0 release of
emdebian-tools to use the new code once apt-cross 0.3.0 is out of the
NEW queue.

apt-cross and lib(.*)aptcross-perl 0.3.0 will depend on dpkg-cross (>=
2.0.0) and emdebian-tools will depend on apt-cross (>= 0.3.0) or lib(.*)
aptcross-perl (>= 0.3.0).

Does dpkg-cross >= 2.0.0 need to conflict with apt-cross << 0.3.0 and
emdebian-tools << 0.4.0 as it removes a file that these versions needed?

dpkg-cross will then provide two binaries in Debian: dpkg-cross and
libdebian-dpkgcross-perl. The dpkg-cross binary will depend on
libdebian-dpkgcross-perl.

apt-cross will also provide two binaries: apt-cross and lib(.*)
aptcross-perl. apt-cross will depend on lib(.*)aptcross-perl which
in turn will depend on libdebian-dpkgcross-perl. (In theory, making it
possible to install apt-cross without the dpkg-cross script itself
although that isn't strictly necessary it will be useful for internal
Emdebian perl scripts that handle our repository because the perl
modules will have fewer dependencies than the frontend scripts.)

[0]
http://alioth.debian.org/plugins/scmcvs/cvsweb.php/dpkg-cross/Debian/?cvsroot=dpkg-cross

[1]
http://buildd.emdebian.org/svn/browser/current/host/trunk/apt-cross/branches/apt-nc-cross/AptCross

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpkFN9xUBO9Z.pgp
Description: PGP signature


Reply to: