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

Re: RFS: jabber-querybot



On Wed, 23 Nov 2011 11:52:05 +0100, Marco Balmer wrote:
On Wed, Nov 23, 2011 at 10:46:42AM +0100, Didier Raboud wrote:
unfortunately, there are things you should change before I can upload:

- according to debdiff between the version currently in unstable and
this version, you changed the 0.0.4-1 changelog entry; which you
should really not (unless there is a good reason; in which case you
should mention it in the changelog entry for the to-be-uploaded
version)

I was not able to find the place I changed log entry for 0.0.4-1.
How can I show this with debdiff?

With something like:

$ apt-get source jabber-querybot/unstable
$ dget -x http://mentors.debian.net/debian/pool/main/j/jabber-querybot/jabber-querybot_0.0.5.1-1.dsc $ debdiff jabber-querybot_0.0.{4,5.1}-1.dsc | grep -A 10 'jabber-querybot (0.0.4-1)'

- you have to cleanup after the faulty postinst that reached the
archive in jabber-querybot 0.0.4-1 (and I plea guilty for this). If
you just "drop" the postinst without making sure the symlink that it
added is properly removed, then it will end up with that situation:

So you probably need a "preinst" that checks the version you are
upgrading from, tests the symlink and removes it in case it still
exists. Then, at unpacking phase, the correct Querymodule.pm file
will get unpacked at its correct place.

I just fixed this and added d/preinst:

http://mentors.debian.net/debian/pool/main/j/jabber-querybot/jabber-querybot_0.0.5.1-1.dsc

Quoting myself extensively in the preinst is not needed. Additionally, you forgot the "checks the version you are upgrading from" in the postinst. The advantage of doing this explicitely is that the code gets run once for each user and then can be removed in the unstable version when jabber-querybot reaches stable (as users are mandated to upgrade from stable to stable releases...). See http://wiki.debian.org/MaintainerScripts for clear graphs.

IMHO, the check you are doing in the preinst is not sufficient; what if Random Joe has set up a symlink named "/etc/jabber-querybot/Querymodule.pm" that points to his user directory (for whatever reason)? Then with this preinst, you are not preserving his changes. So you have to test if the user is both "upgrading" (information is in $1) and is doing so from a version smaller than 0.0.5.1-1 (as it's the first version that introduces the fix) (information is in $2). Then, to be on the safe side, you also have to check that the symlink you want to remove indeed points to the place you had setup in the faulty postinst. In that case only you can safely remove the symlink.

If both this and the changelog issue are fixed properly, then I will upload. :->

Cheers,

OdyX


Reply to: