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

Re: Periodic warning re dpkg's internal data structures



-----BEGIN PGP SIGNED MESSAGE-----

On Wed, 20 May 1998, Ian Jackson wrote:

> If you need an interface to this information that isn't currently
> available you should report it as a bug.

Ok, two examples:

1) Very old smartlist releases had a buggy postrm. To solve this
problem, I did this in the preinst:

if dpkg --compare-versions "$2" lt-nl "3.10-12"; then
  rm -f /var/lib/dpkg/info/smartlist.postrm
fi

How I do the same without accesing the database directly?


2) timezone package is now called timezones. However, if you purge
the old timezone, its conffile is removed. To solve this issue, Dale
decided to put this in timezones.postinst:

if [ -f /var/lib/dpkg/info/timezone.postrm ]; then
   rm /var/lib/dpkg/info/timezone.postrm
   echo '#! /bin/sh' >>/var/lib/dpkg/info/timezone.postrm
   echo 'set -e' >>/var/lib/dpkg/info/timezone.postrm
   chmod +x /var/lib/dpkg/info/timezone.postrm
fi

Ok, the right solution (for now) would be probably not to rename the
package. Is renaming of a package having a conffile supported by dpkg?

Thanks.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1

iQCVAgUBNWLz4yqK7IlOjMLFAQHSTAP/ZjwQHPUrV3lHw+3Bi4JQluQel1WYvFIw
qHt+pJM0W7b47CRXsbWcx1H+n6crpalygNC2P/lJN+0rGLfoNj33bf104AJtr3g1
gq8YfFFVWXfZJIcBEzsqYVJmimOP5wtD20CVyHV78c7eRg59j+SIeOFIyDuPqcxH
mwLZTVuXqVo=
=D+RK
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: