[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removing directories in postrm ?



Christian Schwarz wrote:
    On Sat, 3 Jan 1998, Nicolas Lichtmaier wrote:

    > If that directory contains files generted in package's postinst,
    > I think you should also create that directory there, and remove
    > it in postrm.

    Best solution would IMHO be to include the (empty) directory in the
    package tree so that dpkg takes care of creating and removing the
    directory. Then, you can generate the byte-compiled files in the
    postinst script and should remove them in the prerm script (not
    postrm!).

    This way, the directory will not be wiped away if some other
    package (or the sysadmin) placed some files there.

    (Note, that I can't comment on whether you should ship
    byte-compiled files or compile them on demand. You would have to
    give us a little more info about which files these are, how long
    compilation takes, etc.)

In the meantime, I've come up with a solution for byte-compiling the  
files in debian/rules (which was impossible before), and I think  
including the byte-compiled files in the package is a better solution  
in terms of the space/time question (furthermore, like java .class  
files, they are architecture-independent).

The really bad problem is that the old python 1.4 packages won't  
remove cleanly, since their postrm depends on a script  
/usr/lib/python1.4/compileall.py which is removed with python-base  
(<=1.4). Therefore I decided to fake a link from  
/usr/lib/python1.5/compileall.py to /usr/lib/python1.4/compileall.py,  
so that the old postrm will complete without an error. The result is  
that python-base (>=1.5) re-installs /usr/lib/python1.4/compileall.py,  
just for removing the old packages!

	Gregor


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: