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

Re: Issue with Bug#112121: procmail-lib: Recipes belong in /usr/share, not /usr/lib

On 14-Sep-01, 10:18 (CDT), "Steve M. Robbins" <steven.robbins@videotron.ca> wrote: 
> Err, why not just test for the existence of directory /usr/lib/procmail-lib ?
> Is there an advantage to checking the package version instead?

Because by the time the postinst runs, /usr/lib/procmail-lib is gone.
If it's not there, is it because:

a) I'm upgrading from a version that had it (as a directory), and
should create the symlink?


b) I'm upgrading from a version that didn't, and the sysadmin has
removed the original link (created in case a, above), and I shouldn't
create the symlink?

You could check in the preinst and cache the result, I suppose, but
checking the version is easy:

if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt "3.0pl1-43" ; then

(replacing "3.0pl1-43" with whatever the first version of procmail-lib
is that moves the files from /usr/lib to /usr/share). And it's fast,
dpkg doesn't read any of its files for this.


Reply to: