apt: Segfault when using non-standard directories

Charlie Kravetz cjk at teamcharliesangels.com
Mon Dec 8 19:53:11 UTC 2008


On Fri, 28 Nov 2008 16:00:20 +0100
Josef Spillner <2005 at kuarepoti-dju.net> wrote:

> Package: apt
> Version: 0.7.9ubuntu17
> Severity: normal
> 
> [I'm sorry if this report arrives twice - my reportbug was stuck when
> sending via SMTP]
> 
> *** Please type your report below this line ***
> 
> I'm trying to use apt-get to install packages to a relocated system
> directory, e.g. /tmp.
> 
> However, when running
>  apt-get -o Dir::State::status=/tmp/ -o Dir::Cache::pkgcache=/tmp/
> install w3m apt produces a segfault.
> The backtrace is:
> 
> (gdb) bt
> #0  0xb7eac3f3 in pkgCache::ReMap () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #1  0xb7eac638 in pkgCache::pkgCache () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #2  0xb7ede900 in ?? () from /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #3  0xb7edf00f in pkgMakeStatusCache () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #4  0xb7ed4fd9 in pkgCacheFile::BuildCaches () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #5  0xb7ed5104 in pkgCacheFile::Open () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #6  0x08060022 in ?? ()
> #7  0xb7e9ce8b in CommandLine::DispatchArg () from
> /usr/lib/libapt-pkg-libc6.7-6.so.4.6
> #8  0x0804f06b in ?? ()
> #9  0xb7c14450 in __libc_start_main ()
> from /lib/tls/i686/cmov/libc.so.6 #10 0x0804ce91 in ?? ()
> 
> I assume this has to do with its inability to find a package cache
> there. Running 'apt-get -o ... -o Dir::State::lists=/tmp update' first
> creates the package cache, but then also segfaults, not contributing
> anything positive to the issue above.
> 
> man apt.conf(5) mentions a RootDir setting but this is not explained
> anywhere, nor contained in the example configuration files or the
> Google index.
> Therefore, the whole out-of-order installation process with apt-get,
> e.g. for quarantine purposes, is severely broken. It's not trivial
> with RPM either, but at least it's possible with:
>  mkdir -p $prefix/$rpmdb
>  rpm --initdb --dbpath $prefix/$rpmdb
>  rpm --nosignature --replacepkgs --nodeps --dbpath $rpmdb --root
> $prefix -- relocate /=$prefix -i $@
> 
> apt-get could beat it by just getting a --root option which works
> without further ado, and especially without fakeroot, so debootstrap
> could also be rewritten to be based on that instead of many
> error-prone custom-built scripts (modulo a few system packages).
> 
> -- Package-specific info:
> 
> -- (no /etc/apt/preferences present) --
> 
> 
> -- (/etc/apt/sources.list present, but not submitted) --
> 
> 
> -- System Information:
> Debian Release: lenny/sid
>   APT prefers hardy-updates
>   APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500,
> 'hardy') Architecture: i386 (i686)
> 
> Kernel: Linux 2.6.24-19-386
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages apt depends on:
> ii  libc6                   2.7-10ubuntu4    GNU C Library: Shared
> libraries ii  libgcc1                 1:4.2.3-2ubuntu7 GCC support
> library ii  libstdc++6              4.2.3-2ubuntu7   The GNU Standard
> C++ Library v3
> 
> Versions of packages apt recommends:
> ii  ubuntu-keyring                2008.03.04 GnuPG keys of the Ubuntu
> archive
> 
> -- no debconf information
> 


Can you file this on launchpad? I know the system sent it to the users
mailing list, but it never gets worked if it stays here. 

The right place to file bug reports is:
https://bugs.launchpad.net/ubuntu

That will give the developers a chance to see if they can fix it.

Thanks.

-- 
Charlie Kravetz 
Linux Registered User Number 425914          [http://counter.li.org/]
Never let anyone steal your DREAM.           [http://keepingdreams.com]




More information about the ubuntu-users mailing list