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

Re: Problem with --purge and reinstalling




Le 5 sept. 07 à 22:22, Justin Pryzby a écrit :

On Wed, Sep 05, 2007 at 09:58:32PM +0200, Thibaut Paumard wrote:
[...]
I also wonder how to fix this issue best: I guess /etc/yorick files should belong in the package "yorick", not "yorick-data", but can I simply switch
the files from one package to the other?
No.  You have to remove the files in preinst if their md5sum matches
the md5sum in dpkg's status database.  Actually it's more complicated
if you support dpkg rollbacks.  You have to rename them in preinst (if
they're unmodified), remove them in postinst (in the normal scenario
when everything works), but rename them back to their original name in
postrm abort-upgrade.  All conditional on their existence, version
checks, and md5sum checks. [0]

OK, thanks, I'll do that (and read your reference further).

Actually I tried simply moving the files to yorick and tested my install-purge-reinstall scenario: the result is the one I would have expected to begin with! dpkg says that the files have been deleted and asks whether to reinstall them... looks strange to me that this happens only if I move the files to another package.

Regards, Thibaut.


Reply to: