On Tue, 2012-02-07 at 09:39 +0000, Manuel A. Fernandez Montecelo wrote:
> 2012/2/7 Sam Morris <s...@robots.org.uk>:
> > No problem. I looked into the conffile issue a bit further and I think
> > that the dpkg-maintscript documentation needs to be changed. I filed
> > <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658854> where you can
> > find a brief description of the issue; in summary, I think you should
> > set the 'lastversion' to 1.7.3-7~ in the next revision of the package
> > (assuming that the next revision will be 1.7.3-7 of course). The
> > existing documentation would suggest you use 1.7.3-6, but this causes
> > the conffile removal code to be skipped in the case of a user rebuilding
> > the package with a local version number: the user would be upgrading
> > from 1.7.3-6local1, which is greater than 1.7.3-6 and therefore
> > rm_conffile thinks that it doesn't need to do anything. Any possible
> > (sane) local version number is guaranteed to be << 1.7.3-7~ however, and
> > so that version number is safe to use when invoking rm_conffile.
> 
> Actually, I'm creating a new upstream package (1.7.4-1) because it was
> released in mid January.

Ok, then I suggest 1.7.4-1~ when invoking dpkg-maintscript-helper.

> Yesterday when past midnight I gave up when testing this, because with
> my tests I get the file renamed and backed up sometimes, e.g. when
> using the file from -4 or so (cannot recall the actual details).  In
> -5 the paths within the plugins.cfg had to be changed because of
> multi-archi-fying, and in -6 the file moved to /etc/OGRE-VERSION/ to
> make possible to install different versions of OGRE at once.  A bit of
> a mess, yes, and ultimately to remove the file altogether.
> 
> Maybe the helper assumes that you've installed each and every version
> and just compares with the md5sum of the last version used?

The version check is just there so that the code for removing/renaming a
conffile is only run once. The problem I ran into is that I'd rebuilt
the package, bumping the version number past that which the new
package's maintainer scripts invoked rm_conffile with. Hence the bug I
filed on dpkg to get the documentation sorted out. Then will come
lintian checks, perhaps... :)

> I'm using this right now:
> -----------
> $ cat debian/libogre-VERSION.preinst
> #!/bin/sh -e
> 
> if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
>     dpkg-maintscript-helper rm_conffile /etc/OGRE/plugins.cfg 1.7.4-1 
> libogre-1.7.3 -- "$@"
>     dpkg-maintscript-helper rm_conffile /etc/OGRE-1.7.3/plugins.cfg 1.7.4-1 
> libogre-1.7.3 -- "$@"
> fi
> 
> $ md5sum debian/libogre-VERSION.{preinst,postinst,postrm}
> 9dc129ad3931e9a550ca9f65f7ee800e  debian/libogre-VERSION.preinst
> 9dc129ad3931e9a550ca9f65f7ee800e  debian/libogre-VERSION.postinst
> 9dc129ad3931e9a550ca9f65f7ee800e  debian/libogre-VERSION.postrm
> -----------

That looks fine to me (though the version number should be changed).

> So I will need to test all of the possible combinations to try to
> understand it and fix it for good this time.
> 
> BTW, I moved the packaging to:
> http://anonscm.debian.org/gitweb/?p=pkg-games/ogre.git;a=summary
> 
> I have to synchronise last changes from yesterday (will try to do it
> within the next hours), but maybe you find it helpful.

Great. I'll test this and let you know what happens.
> 
> Cheers.
> 
> 
> PS: are you trying to backport the package or something?

Yeah, just for my own build servers. We need to use Boost 1.48 hence I
rebuild the package.

-- 
Sam Morris <s...@robots.org.uk>




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to