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

Bug#694127: apt-utils: apt-extracttemplates is confused when RootDir is set



Package: apt-utils
Version: 0.8.10.3+squeeze1
Severity: normal

I was trying to dist-upgrade chroot'd environment. I created configuration
file with:

RootDir "/tmp/mychroot";

and pointed APT_CONFIG to it.
Then I ran:

# export APT_CONFIG
# apt-get update
# apt-get dist-upgrade

apt-get dist-upgrade failed after downloading packages as it was not able to
extract templates. Many errors were reported saying:
E: Could not open file /var/cache/apt/archives/<package> - open (2: No such file or directory)
E: Unable to determine the file size - fstat (9: Bad file descriptor)
E: Read error - read (9: Bad file descriptor)

It suggests, that apt-extracttemplates (and maybe other components) does not
honor RootDir option. The packages were downloaded to the chroot'd environment,
but apt-extracttemplated looked them up in the primary environment.

I was able to workaround this with setting:
Dpkg::Chroot-Directory "/tmp/mychroot";

in the APT_CONFIG file. However, this caused dpkg to be chrooted to /tmp/mychroot/tmp/mychroot,
which obviously does not exist.

The only possible workaround seems to be to chroot whole 'apt-get dist-upgrade'.
# chroot /tmp/mychroot apt-get dist-upgrade

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37.6 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt-utils depends on:
ii  apt [libapt-pkg4.10]   0.8.10.3+squeeze1 Advanced front-end for dpkg
ii  libc6                  2.11.3-4          Embedded GNU C Library: Shared lib
ii  libdb4.8               4.8.30-2          Berkeley v4.8 Database Libraries [
ii  libgcc1                1:4.4.5-8         GCC support library
ii  libstdc++6             4.4.5-8           The GNU Standard C++ Library v3

apt-utils recommends no packages.

apt-utils suggests no packages.

-- no debconf information


Reply to: