Re: fixing this
Hi Andreas,
On Fr, 11 Mai 2012, Andreas Beckmann wrote:
> preinst is probably too early to remove the diversions (the old package is
> still installed so both orig_file (the version from ptex-bin) and
> diverted_file (from whatever package) could exist in the file system.
> But postinst should be fine to do the cleanup.
Ahh, true, thanks.
> > if dpkg --compare-versions "$2" le "2011.20120509-1" ; then
>
> use 'le-nl' unless you want to run this on initial install ($2=""), too
le-nl isn't that << ?
But 2011.20120509-1 is a version still mssing this code, so we should
run it.
I guess better is
if [ -n "$2" ] ; then
if dpkg --compare-versions "$2" le "2011.20120509-1" ; then
...
then it should only run on upgrades from all packages up to 2011.20120509-1.
> For noiseless removal of diversions you could use something like:
Thanks.
> Pre-Depends: dpkg (>= 1.15)
> (plain Depends: would be sufficient if this gets into postinst only)
Thanks.
Will use that.
> You only need to remove the old diversions, there are no new diversions to be
> created?
No. I don't like diversions ;-)
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
DOCKERY (n.)
Facetious behaviour adopted by an accused man in the mistaken belief
that this will endear him to the judge.
--- Douglas Adams, The Meaning of Liff
Reply to: