Re: Installing extra packages into /target/ - suggested design
* Petter Reinholdtsen
| [Tollef Fog Heen]
| > I'm not sure using apt is a good thing for this. It would mean that
| > your sources.list would have to be correctly set up and (for
| > cd/floppy/nfs installs) the media should be mounted inside the
| > chroot, in the right place. How do you propose we ensure this?
| I solved this by calling APT twice, once to download the package with
| root on /, and once to installing with root on /target. This works.
| The code look like this (from rootskel - apt-install):
| PATH=$PATH:/target/usr/bin:/target/bin:/target/usr/sbin:/target/sbin \
| LD_LIBRARY_PATH=/usr/lib:/lib:/target/usr/lib:/target/lib \
| /target/usr/bin/apt-get \
| -o Dir::State=/target/var/lib/apt \
| -o Dir::State::status=/target/var/lib/dpkg/status \
| -o Dir::Cache=/target/var/cache/apt \
| -o Dir::Etc=/target/etc/apt \
| -o Dir::Bin::methods=/target/usr/lib/apt/methods \
| -o Dir::Bin::gzip=/target/bin/gzip \
| -o Dir::Bin::dpkg=/target/usr/bin/dpkg \
| -o Dpkg::Options::=--root=/target \
| -y --download-only install $*
This breaks when libc breaks backwards compat, doesn't it? Undefined
symbols and such? (And as a minor point, we want "$@" not $*). And it
requires sources.list set up.
| I would rather have something that handles dependencies.
So would I. But I'd like to have it in debootstrap. :)
Tollef Fog Heen ,''`.
UNIX is user friendly, it's just picky about who its friends are : :' :