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

Re: Bootstrapping a foreign architecture with multiarch



On Thu, 3 Mar 2011 08:31:51 +0100
Raphael Hertzog <hertzog@debian.org> wrote:

> > > 3/ Any program that assumes the current layout of control files
> > >    (/var/lib/dpkg/info/<package>.<something>) will be broken (at
> > > least for some packages) since the layout will change to support
> > > Multi-Arch: same packages that can be co-installed.
> > > 
> > >    You should use "dpkg-query --control-path <package> <something>" to
> > >    retrieve the path of the file. This has been introduced in dpkg
> > > 1.15.4 and is thus in squeeze already.

dpkg cannot be executed inside the chroot because it has not
necessarily been unpacked at this stage, it certainly has not been
configured. (dpkg is running from outside the chroot).

Yet dpkg-query won't work with --admindir to operate from outside:

$ dpkg-query --admindir /home/neil/code/chroots/natty-amd64/var/lib/dpkg --control-path libc6 postinst
$

Inside:
/home/test# dpkg-query --control-path libc6 postinst
/var/lib/dpkg/info/libc6:amd64.postinst

/home/test# dpkg-query --admindir /var/lib/dpkg --control-path libc6 control
/var/lib/dpkg/info/libc6:amd64.control

$ ls -l /home/neil/code/chroots/natty-amd64/var/lib/dpkg/status
-rw-r--r-- 1 root root 261652 Apr  1 21:46 /home/neil/code/chroots/natty-amd64/var/lib/dpkg/status

dpkg outside the chroot is 1.15.8.10

Do you want a bug report for that one?

Anyways:

> Multi-Arch: same packages will use
> /var/lib/dpkg/info/<package>:<arch>.<something>
> 
> > For Multistrap, every file in /var/lib/dpkg/ has to be created by
> > multistrap, based on the data obtained from dpkg -e (basically the
> > DEBIAN/ content). This data needs only to be sufficient that dpkg can
> > correctly configure the packages once dpkg itself is able to be
> > executed inside the new filesystem.
> 
> It's sufficient, you just need to know the value of the Multi-Arch field.

True. I've got a change now which uses dpkg -f to check the Multi-Arch
field of the actual downloaded .deb (independent of arch) and use that
to detect Multi-Arch: same, then lookup Architecture in the same way,
add that to the filename of the created maintainer script etc.
for /path/to/chroot/var/lib/dpkg/info/*

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgp6p7lptq2gM.pgp
Description: PGP signature


Reply to: