Re: Problem with --purge and reinstalling

2007-09-14 Thread Thibaut Paumard


Le 5 sept. 07 à 21:58, Thibaut Paumard a écrit :


Dear mentors,

I'm maintaining the yorick-* packages. The source package is split  
into yorick, yorick-data and yorick-dev. The conffiles are in the - 
data package. However, yorick.postrm removes these files upon -- 
purge. I guess I must have been slightly offset from my head when I  
did this, but that's the situation in Etch.


I just noticed a problem if a user does:
aptitude install yorick (installs yorick and yorick-data)
aptitude remove yorick (removes yorick and yorick-data)
dpkg --purge yorick (deletes /etc/yorick/*, which actually belongs  
to yorick-data)

aptitude install yorick (installs yorick and yorick-data)

When reinstalling yorick the conffiles are not installed! One needs  
to purge y-data for these conffiles to get reinstalled.


Hi all,

I've been thinking about it and Justin's answer, and this is where I  
stand:


1) I believe the conffiles should belong to the yorick package, not  
yorick-data.


2) the upgrade from etch's yorick to the next set should be seamless  
if yorick and yorick-data have both been removed and if they boh been  
purged (equivalent to not installed).


3) on the other hand, in this special case, I believe the admin  
should be prompted either if the files have been modified or if they  
have been deleted.


Do we agree on what the next upload of the package _should_ do?

Best regards, Thibaut.



Re: Problem with --purge and reinstalling

2007-09-06 Thread Thibaut Paumard


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.


Re: Problem with --purge and reinstalling

2007-09-06 Thread Thibaut Paumard


Le 5 sept. 07 à 23:54, Neil Williams a écrit :


On Wed, 5 Sep 2007 21:58:32 +0200
Thibaut Paumard [EMAIL PROTECTED] wrote:


Dear mentors,

I'm maintaining the yorick-* packages. The source package is split
into yorick, yorick-data and yorick-dev.


Is yorick-doc not useful in that list? It's currently orphaned (I did
the QA upload on it). #35


Yorick-doc has currently its own source package and is mostly out-of- 
date. I'll fix it once it's integrated in yorick's source by  
upstream, which seems to be happening. (Since my uploads are  
sonsored, I avoid unnecessary uploads when I think a better solution  
will be possible soon).


Regards, T.



Re: Problem with --purge and reinstalling

2007-09-06 Thread Thibaut Paumard


Le 5 sept. 07 à 23:54, Neil Williams a écrit :


On Wed, 5 Sep 2007 21:58:32 +0200
Thibaut Paumard [EMAIL PROTECTED] wrote:


Dear mentors,

I'm maintaining the yorick-* packages. The source package is split
into yorick, yorick-data and yorick-dev.


Is yorick-doc not useful in that list? It's currently orphaned (I did
the QA upload on it). #35


Yorick-doc has currently its own source package and is mostly out-of- 
date. I'll fix it once it's integrated in yorick's source by  
upstream, which seems to be happening. (Since my uploads are  
sonsored, I avoid unnecessary uploads when I think a better solution  
will be possible soon).


Regards, T.



Problem with --purge and reinstalling

2007-09-05 Thread Thibaut Paumard

Dear mentors,

I'm maintaining the yorick-* packages. The source package is split  
into yorick, yorick-data and yorick-dev. The conffiles are in the - 
data package. However, yorick.postrm removes these files upon -- 
purge. I guess I must have been slightly offset from my head when I  
did this, but that's the situation in Etch.


I just noticed a problem if a user does:
aptitude install yorick (installs yorick and yorick-data)
aptitude remove yorick (removes yorick and yorick-data)
dpkg --purge yorick (deletes /etc/yorick/*, which actually belongs to  
yorick-data)

aptitude install yorick (installs yorick and yorick-data)

When reinstalling yorick the conffiles are not installed! One needs  
to purge y-data for these conffiles to get reinstalled.


I can clearly see that there is a bug in my packages in that  
yorick.postrm should certainly not remove files owned by yorick-data,  
but I don't understand why the files are not reinstalled.


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?


Regards, Thibaut.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Problem with --purge and reinstalling

2007-09-05 Thread Justin Pryzby
On Wed, Sep 05, 2007 at 09:58:32PM +0200, Thibaut Paumard wrote:
 Dear mentors,

 I'm maintaining the yorick-* packages. The source package is split into 
 yorick, yorick-data and yorick-dev. The conffiles are in the -data package. 
 However, yorick.postrm removes these files upon --purge. I guess I must 
 have been slightly offset from my head when I did this, but that's the 
 situation in Etch.
conffiles shouldn't ever be modified, created, moved, or removed by
any package except dpkg.

 I just noticed a problem if a user does:
 aptitude install yorick (installs yorick and yorick-data)
 aptitude remove yorick (removes yorick and yorick-data)
 dpkg --purge yorick (deletes /etc/yorick/*, which actually belongs to 
 yorick-data)
 aptitude install yorick (installs yorick and yorick-data)

 When reinstalling yorick the conffiles are not installed! One needs to 
 purge y-data for these conffiles to get reinstalled.
They're probably in etch's dpkg's obsolete state; use dpkg -s on
those pacakges.

 I can clearly see that there is a bug in my packages in that yorick.postrm 
 should certainly not remove files owned by yorick-data, but I don't 
 understand why the files are not reinstalled.
That's the (obsolete) thing.  Removal of conffiles is supposed to be
preserved.

 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]

Technically that might not be necessary if the files to be moved are
identical between etch and lenny.

Justin

References

[0] http://justinpryzby.com/debian/dpkg/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Problem with --purge and reinstalling

2007-09-05 Thread Neil Williams
On Wed, 5 Sep 2007 21:58:32 +0200
Thibaut Paumard [EMAIL PROTECTED] wrote:

 Dear mentors,
 
 I'm maintaining the yorick-* packages. The source package is split  
 into yorick, yorick-data and yorick-dev. 

Is yorick-doc not useful in that list? It's currently orphaned (I did
the QA upload on it). #35

-- 


Neil Williams
=
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/



pgpjCH4Ps64kP.pgp
Description: PGP signature