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

Modifying /etc/apt/sources.list in postinst ; determining the suite in postinst



Two related problems, both in the same package: emdebian-tools[0] [1].
Neither are etch related, this only affects the next release of the
package as it needs to work within a chroot. (No version of
emdebian-tools exists in testing.)

To install a cross-building toolchain, apt/aptitude needs to be told
about the Emdebian [2] toolchain repository [3]. Currently, that is done
by the emsetup program in emdebian-tools but I'm wondering if it is
better done in postinst. The question then is: how to determine the
suite (only unstable, testing, sid, etch and lenny are supported by
Emdebian) from postinst (using Perl)? I'm currently parsing a call to
'apt-cache policy' within emsetup but is that OK to call in postinst?

There is also a problem with installations created using debootstrap or
which end up with a single apt source of ftp.debian.org by some other
means - this mirror does not support all architectures. In particular,
it does not support the typical cross-building architectures like arm.
In these situations, or when any installation ends up with a
non-primary mirror, emdebian-tools needs to add a primary mirror to
the sources list. How can this be determined cleanly? Which
primary mirror? (preferably not another debconf question).

Finally, if this is done in postinst, presumably the changes will have
to be removed in postrm or can dpkg be persuaded to do this for me?
(Could I ship a sources.list file in the package and move the previous
one to sources.dpkg-old?)

update-manager and netselect-apt already modify /etc/apt/sources.list
but not in postinst.

[0] http://packages.debian.org/unstable/utils/emdebian-tools
[1]
http://buildd.emdebian.org/svn/browser/current/host/trunk/emdebian-tools/trunk/
[2] http://www.emdebian.org/
[3] http://www.emdebian.org/debian/pool/main/

--


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

Attachment: pgpVwJMYwUzUF.pgp
Description: PGP signature


Reply to: