[Erp5-dev] ERP5's deb package does not rebuild /home/erp5 in case of total removal of /home/erp5

Tadeus Prastowo tadeus.prastowo at infi-nity.com
Wed Sep 16 12:19:16 CEST 2009


Hi Ho!

I upgraded my Hardy to Jaunty using Update Manager. In my Hardy, I had
got ERP5 installation that I hadn't used because of the already-fixed
problem mentioned in
http://mail.nexedi.com/pipermail/erp5-dev/2009-September/002292.html

After the upgrade, I purged ERP5 from my system and deleted /home/erp5
to start everything from scratch. My erp5.list in
my /etc/apt/sources.list.d is as follows:

--- 8< ---------------
deb http://10.0.0.51:3142/erp5.raskon.org/apt jaunty main
deb-src http://10.0.0.51:3142/erp5.raskon.org/apt jaunty main
--- 8< ---------------

Doing sudo aptitude install erp5-buildout ended with the following error message:

--- 8< ---------------
Setting up erp5-buildout (0.8jaunty1) ...
abort: No such file or directory: /home/erp5/erp5-buildout
dpkg: error processing erp5-buildout (--configure):
 subprocess post-installation script returned error exit status 255
Processing triggers for python-support ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Processing triggers for menu ...
Errors were encountered while processing:
 erp5-buildout
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up erp5-buildout (0.8jaunty1) ...
abort: No such file or directory: /home/erp5/erp5-buildout
dpkg: error processing erp5-buildout (--configure):
 subprocess post-installation script returned error exit status 255
Errors were encountered while processing:
 erp5-buildout
--- 8< ---------------

Well, I solved this problem by manually pulling out erp5-buildout from
the repository at https://www.raskon.org/hg as follows:

sudo mkdir /home/erp5/
sudo chown erp5:erp5 /home/erp5
cd /home/erp5
sudo -u erp5 hg clone https://www.raskon.org/hg/erp5-buildout

After that, entering `sudo aptitude install erp5-buildout' completes the
installation phase.

The same problem also appears on Hardy if I try to reinstall
erp5-buildout after I purged erp5-buildout and removed /home/erp5.

The error, however, does not appear if I start with a fresh installation
of Hardy or Jaunty. Restarting the system does not help.

After some investigation, I realized that "/home/erp5" is created by
"adduser". Since "sudo aptitude purge erp5-buildout" does not remove
erp5 user and group in "debian/postrm" script, it prevents "adduser"
from running in "debian/postinst" script, and therefore, no creation of
"/home/erp5".

This situation is annoying for users that somehow try to start the
installation of ERP5 from scratch by removing "/home/erp5" manually.
Therefore, I propose the attached patches. Only one of them needs to be
applied because patch1 fixes the problem in "debian/postinst" script
while patch2 fixes the problem in "debian/postrm" script. I myself
prefer patch2 to be applied since it is saner.

Best regards,
Eus

--------------------------------------
Free Software specialist and developer
        of
PT. Vikasa Infinity Anugerah
--------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch1
Type: text/x-patch
Size: 738 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20090916/8b690cc1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch2
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20090916/8b690cc1/attachment-0001.bin>


More information about the Erp5-dev mailing list