Comment 3 for bug 1289249

Revision history for this message
Para Siva (psivaa) wrote :

This is happening with packages that start their background services and processes automatically on installation. The unmounting/ removing the chroot dirs get permission denied because there are used by those background processes. lsof of the concerned dir's lists the daemon processes of the packages being installed.

Killing those processes alone doesn't make the dir's removable. One needs to logout and login back to make the dir's completely removable.

So over the weekend, I tried to workaround this by preventing the processes from running during installation itslef by pointing to invoke-rc.d, initctl, etc as given in http://askubuntu.com/questions/74061/install-packages-without-starting-background-processes-and-services. I have already tried running "chroot /tmp/tmpPrgN44/mountpoint /usr/bin/env - PATH=/root/fake:$PATH /usr/bin/apt-get install" and subprocess.Popen([cmd] , env={"PATH": "/root/fake:$PATH"}) but both fail with 127 in the chrooted env.

@Paul: I think I have exhausted all my avenues here to fix the issue. Hoping you could find a way to workaround this I am assigning back to you.