"Davide G. M. Salvetti" wrote:

> Thus, I guess I only need to clean:
> >----------------------------------------------------------------------<
> /usr/share/emacs/19.34/site-lisp/mailcrypt/CompilationLog.gz
> /usr/share/emacs/20.3/site-lisp/mailcrypt/CompilationLog.gz
> /usr/share/emacs/20.4/site-lisp/mailcrypt/CompilationLog.gz
> >----------------------------------------------------------------------<
> 
> Is it ok if I clean that old cruft in
> /usr/lib/emacsen-common/packages/remove/mailcrypt?
> 
> Are there any suggestion on the best way to do it?  (My plan is rm -f
> those_files.)

I thought a bit more about this.  We could delete _all_
package-related cruft in a preinst script (that way you know none
are supposed to exist at that time), but that would mean having
a preinst script!

Another way is to check for the existance of the related emacs
binary.  In perl, I'd do:

-------------------
#!/usr/bin/perl

while (</usr/share/emacs/*/site-lisp/gri-mode.CompilationLog.gz>) {
    /\/usr\/share\/emacs\/(.*)\/site-lisp/;
    if (! -e "/usr/bin/emacs-$1" ) {
        print "Deleting $_\n";
#       unlink $_ or die "Cannot delete $_.\n";
    }
}
while (</usr/share/xemacs*/site-lisp/gri-mode.CompilationLog.gz>) {
    /\/usr\/share\/xemacs(.*)\/site-lisp/;
    if (! -e "/usr/bin/xemacs$1" ) {
        print "Deleting $_\n";
#       unlink $_ or die "Cannot delete $_.\n";
    }
}
-------------------

Removing the comments for unlink, of course.
So either I translate this to shell code (?) or I call it as a
perl `here' file (perl <<EOF).

Peter
-- 
Peter Galbraith, research scientist          <[EMAIL PROTECTED]>
Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546
    6623'rd GNU/Linux user at the Counter - http://counter.li.org/ 


Reply via email to