On 20/10/08 at 19:20 +0200, gregor herrmann wrote: > On Mon, 20 Oct 2008 07:28:07 +0200, Lucas Nussbaum wrote: > > > During tests using piuparts of all packages in lenny, > > I ran into the following problem: > > Thanks for your tests and the bug report! > > > > Setting up udev (0.125-7) ... > > > unable to open device '/class/net/*' > > > A chroot environment has been detected, udev not started. > [..] > > > /var/lib/dpkg/info/iodine.postinst: line 27: ./MAKEDEV: No such file or directory > > > dpkg: error processing iodine (--configure): > > > subprocess post-installation script returned error exit status 1 > > > Errors were encountered while processing: > > > iodine > > > E: Sub-process /usr/bin/dpkg returned an error code (1) > > Ah, fun with udev in a chroot. > But unconditionally calling MAKEDEV in postinst is of course no good > idea ... Couldn't you depend on makedev? > After looking at some other .postinst files I have prepared the > following patch now: > > #v+ > > Index: debian/postinst > =================================================================== > --- debian/postinst (revision 1469) > +++ debian/postinst (working copy) > @@ -23,8 +23,11 @@ > case "$1" in > configure) > # we need a tun device > - echo "Creating device /dev/net/tun ..." > - cd /dev && ./MAKEDEV tun > + if [ ! -c /dev/net/tun ] && [ -x /dev/MAKEDEV ] ; then > + echo "Creating device /dev/net/tun ..." > + cd /dev > + ./MAKEDEV tun || true > + fi > # and we want a special user > adduser --quiet --system --home /var/run/iodine iodine > # generate /etc/default/iodine > > > #v- > > piuparts now succeeds -- at least regarding to iodine, it is not very > happy about purging udev: > > 1m5.3s ERROR: Package purging left files on system: > /lib/libvolume_id.so.0 owned by: libvolume-id0 > /usr/share/doc/libvolume-id0 owned by: libvolume-id0 > > 1m5.3s ERROR: After purging files have disappeared: > /etc/udev owned by: util-linux, udev > /etc/udev/rules.d owned by: util-linux, udev > > 1m5.3s ERROR: FAIL: Installation and purging test. > > But I guess there's not much I can do about it, right? Yeah, I'm not filing bugs about leftover files after purge anyway. (about 30% of the packages would be affected) > Any comments on the patch? see above -- | Lucas Nussbaum | lucas@lucas-nussbaum.net http://www.lucas-nussbaum.net/ | | jabber: lucas@nussbaum.fr GPG: 1024D/023B3F4F |
Attachment:
signature.asc
Description: Digital signature