[Bug 606668] Re: dpkg fails to run preinst when using --admindir

Raphaël Hertzog hertzog at debian.org
Sat Nov 26 18:08:02 UTC 2011


** Changed in: dpkg (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/606668

Title:
  dpkg fails to run preinst when using --admindir

Status in “dpkg” package in Ubuntu:
  Triaged

Bug description:
  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 :-(

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/606668/+subscriptions




More information about the foundations-bugs mailing list