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

How to run dpkg Post-Invoke *only* at package installation?



Hi, i'm the author of the tiny Debian "localepurge" package which,
quoting part of its description, is

    "just a simple script to recover diskspace wasted for unneeded
     locale files and localized man pages. It will automagically be
     invoked upon completion of any apt installation run.  It uses the
     dpkg "Post-Invoke" function to execute the script
     "/usr/sbin/localepurge", which automagically deletes the
     directory of every single locale *not* defined in
     "/etc/locale.nopurge".

Well, it works pretty well so far.  But unfortunately it will run even
when not installing packages but also when removing packages.  This is
quite useless and just a waste of processor time.  

So, does anyone have any idea how i could prevent localepurge from
running when only package removals are taking place?  Or better put:
how can i make localepurge only run at package installations?  Any
idea from some gifted shell programming wizard?

                                  Clueless, P. *8^/
-- 
     ------------ Paul Seelig <pseelig@uni-mainz.de> --------------
   African Music Archive - Institute for Ethnology and Africa Studies
   Johannes Gutenberg-University - Forum 6 - 55099 Mainz/Germany
   ----------------- http://ntama.uni-mainz.de ------------------



Reply to: