Public bug reported:

Binary package hint: dpkg

Release: Ubuntu 9.10
dpkg version: 1.15.4ubuntu2.1

I'm running dpkg overriding the admin dir, so that i may run run it as
non-root in my code unit tests (creating an ant deb creation task)

dpkg --install --force-all --admindir=createinstaller-
complex/install/var/lib/dpkg --root=createinstaller-complex/install
--instdir=createinstaller-complex/install createinstaller-
complex/bmtest.deb

All goes well up to the point of executing the script, where strace
shows:

11908 stat64("createinstaller-complex/install/var/lib/dpkg/tmp.ci/preinst", 
{st_mode=S_IFREG|0644, st_size=250, ...}) = 0
11908 chmod("createinstaller-complex/install/var/lib/dpkg/tmp.ci/preinst", 
0755) = 0
11908 clone(child_stack=0, 
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7675788) 
= 11914
11908 rt_sigaction(SIGQUIT, {0x1, [], 0}, {0x1, [], 0}, 8) = 0
11908 rt_sigaction(SIGINT, {0x1, [], 0},  <unfinished ...>
11914 chroot("createinstaller-complex/install" <unfinished ...>
11908 <... rt_sigaction resumed> {SIG_DFL, [], 0}, 8) = 0
11914 <... chroot resumed> )            = 0
11908 waitpid(11914,  <unfinished ...>
11914 chdir("/")                        = 0
11914 execve("/var/lib/dpkg/tmp.ci/preinst", ["/var/lib/dpkg/tmp.ci/preinst", 
"install"], [/* 26 vars */]) = -1 ENOENT (No such file or directory)

As you can see, up to that point, dpkgs always uses the right directory,
and creates the preinst script in "createinstaller-
complex/install/var/lib/dpkg/tmp.ci/preinst", however when it tried to
execute it, it does so by calling "/var/lib/dpkg/tmp.ci/preinst", which
is naturally wrong and makes the whole thing fail :-(

** Affects: dpkg (Ubuntu)
     Importance: Undecided
         Status: New

-- 
dpkg fails to run preinst when using --admindir
https://bugs.launchpad.net/bugs/606668
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to