Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#670494: fixing this

6 views
Skip to first unread message

Norbert Preining

unread,
May 10, 2012, 7:30:02 PM5/10/12
to
Hi Andreas, hi all,

btw, why on earth did this bug not reach the debian-tex-maint ML
as the current maintainer of ptex-bin? It was reported against
Package: ptex-bin
Version: 2011.20120424-1

Anyway. Yes it is true, we have to remove the diversion and other
stuff by the old ptex-bin package in the new ptex-bin.preinst

I have made the following additions to the preinst of ptex-bin:
case "$1" in
install|upgrade)
if dpkg --compare-versions "$2" le "2011.20120509-1" ; then
rm -f /etc/texmf/texmf.d/30ptex*
rm -f /etc/texmf/fmt.d/30ptex*
rm -f /etc/texmf/texmf.d/20ptex*
rm -f /etc/texmf/fmt.d/20ptex*

# these will give a warning message for installations who
# did install ptex-bin only from 2011 and not the old one
# No diversion 'diversion of ....none removed.
# but fortunately dpkg-divert returns 0 in this case
# so we do not need to care too much for that
dpkg-divert --package ptex-bin --remove --rename --divert \
/usr/bin/pltotf.nonja /usr/bin/pltotf

dpkg-divert --package ptex-bin --remove --rename --divert \
/usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz

dpkg-divert --package ptex-bin --remove --rename --divert \
/usr/bin/tftopl.nonja /usr/bin/tftopl

dpkg-divert --package ptex-bin --remove --rename --divert \
/usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
fi
esac



Please let me know if you think this appropriate or if we need anything
more?

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
------------------------------------------------------------------------
JURBY (n.)
A loose woollen garment reaching to the knees and with three or more
armholes, knitted by the wearer's well- meaning but incompetent aunt.
--- Douglas Adams, The Meaning of Liff



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

Atsuhito Kohda

unread,
May 10, 2012, 8:50:01 PM5/10/12
to
Hi Norbert and all,

On Fri, 11 May 2012 08:21:10 +0900, Norbert Preining wrote:

> I have made the following additions to the preinst of ptex-bin:
> case "$1" in
> install|upgrade)
> if dpkg --compare-versions "$2" le "2011.20120509-1" ; then
> rm -f /etc/texmf/texmf.d/30ptex*
> rm -f /etc/texmf/fmt.d/30ptex*
> rm -f /etc/texmf/texmf.d/20ptex*
> rm -f /etc/texmf/fmt.d/20ptex*

Please don't remove 20ptex* because 20ptexjtex.cnf comes
from my package ptex-jtex.

Well ptex-jtex is, in short, pTeX in old days (latex209 or
\documentstyle for example) and license is also old ASCII's
license and so in non-free. But it runs faster than the
current pTeX and sometimes current pTeX's compatibility mode
doesn't work for old files so it is (very rare but) useful yet.

Fortunately ptex-jtex can be modified to be installable with
pTeX of TeXLive so I continue to maintain it.
Anytime I can remove ptex-jtex but untill it causes some
inconveniences I'll maintain it.

> dpkg-divert --package ptex-bin --remove --rename --divert \
> /usr/bin/pltotf.nonja /usr/bin/pltotf
>
> dpkg-divert --package ptex-bin --remove --rename --divert \
> /usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz
>
> dpkg-divert --package ptex-bin --remove --rename --divert \
> /usr/bin/tftopl.nonja /usr/bin/tftopl
>
> dpkg-divert --package ptex-bin --remove --rename --divert \
> /usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
> fi
> esac
>
>
>
> Please let me know if you think this appropriate or if we need anything
> more?

I think it is reasonable.

Best regards, 2012-5-11(Fri)

--
Debian Developer - much more I18N of Debian
Atsuhito Kohda <kohda AT debian.org>
Department of Math., Univ. of Tokushima

Norbert Preining

unread,
May 10, 2012, 9:10:02 PM5/10/12
to
Kohda-san,

thanks for your quick answer.

On Fr, 11 Mai 2012, Atsuhito Kohda wrote:
> > rm -f /etc/texmf/texmf.d/30ptex*
> > rm -f /etc/texmf/fmt.d/30ptex*
> > rm -f /etc/texmf/texmf.d/20ptex*
> > rm -f /etc/texmf/fmt.d/20ptex*
>
> Please don't remove 20ptex* because 20ptexjtex.cnf comes
> from my package ptex-jtex.

Ahh, I just coped from ptex-bin ... indeed, that is dangerous.
So that should be:
rm -f /etc/texmf/texmf.d/30ptex.cnf
rm -f /etc/texmf/fmt.d/30ptex.cnf
rm -f /etc/texmf/texmf.d/20ptex.cnf
rm -f /etc/texmf/fmt.d/20ptex.cnf
then?

> Anytime I can remove ptex-jtex but untill it causes some
> inconveniences I'll maintain it.

No problem. If you need something special from ptex-bin (which you
should NOT, but from texlive-lang-cjk!) then let me know.

> > dpkg-divert --package ptex-bin --remove --rename --divert \
> > /usr/bin/pltotf.nonja /usr/bin/pltotf
> >
> > dpkg-divert --package ptex-bin --remove --rename --divert \
> > /usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz
> >
> > dpkg-divert --package ptex-bin --remove --rename --divert \
> > /usr/bin/tftopl.nonja /usr/bin/tftopl
> >
> > dpkg-divert --package ptex-bin --remove --rename --divert \
> > /usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
> > fi
> > esac
> >
> >
> >
> > Please let me know if you think this appropriate or if we need anything
> > more?
>
> I think it is reasonable.

So the above divert are fine.


Fixing now the removals ...

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
------------------------------------------------------------------------
SHANKLIN (n.)
The hoop of skin around a single slice of salami.
--- Douglas Adams, The Meaning of Liff



Andreas Beckmann

unread,
May 10, 2012, 9:50:01 PM5/10/12
to
Hi Norbert,

[don't forget to Cc: the -submitter]

On Friday, 11. May 2012 01:21:10 Norbert Preining wrote:
> I have made the following additions to the preinst of ptex-bin:

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.

> if dpkg --compare-versions "$2" le "2011.20120509-1" ; then

use 'le-nl' unless you want to run this on initial install ($2=""), too

> # these will give a warning message for installations who
> # did install ptex-bin only from 2011 and not the old one

For noiseless removal of diversions you could use something like:

Pre-Depends: dpkg (>= 1.15)
(plain Depends: would be sufficient if this gets into postinst only)

undivert()
{
file_orig="$1"
diverter="$(dpkg-divert --listpackage "$file_orig")"
if [ -n "$diverter" ]; then
file_diverted="$(dpkg-divert --truename "$file_orig")"
dpkg-divert --remove --rename --package "$diverter" \
--divert "$file_diverted" "$file_orig"
fi
}

undivert /usr/bin/pltotf
undivert /usr/share/man/man1/pltotf.1.gz
undivert /usr/bin/tftopl
undivert /usr/share/man/man1/tftopl.1.gz

(untested, but in glx-diversions.postinst I used something much more complex
to cleanup+migrate some diversions)

> Please let me know if you think this appropriate or if we need anything
> more?

You only need to remove the old diversions, there are no new diversions to be
created?


Andreas

Andreas Beckmann

unread,
May 10, 2012, 10:00:01 PM5/10/12
to
On Friday, 11. May 2012 01:21:10 Norbert Preining wrote:
> btw, why on earth did this bug not reach the debian-tex-maint ML
> as the current maintainer of ptex-bin? It was reported against
> Package: ptex-bin
> Version: 2011.20120424-1

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670494

Package: ptex-bin;
Maintainer for ptex-bin is Masayuki Hatta (mhatta) <mha...@debian.org>;
Source for ptex-bin is src:texlive-lang.

BTS bug? Still considers the old maintainer as current?


Andreas

Norbert Preining

unread,
May 10, 2012, 10:00:01 PM5/10/12
to
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



Norbert Preining

unread,
May 10, 2012, 10:10:01 PM5/10/12
to
On Fr, 11 Mai 2012, Andreas Beckmann wrote:
> Package: ptex-bin;
> Maintainer for ptex-bin is Masayuki Hatta (mhatta) <mha...@debian.org>;
> Source for ptex-bin is src:texlive-lang.

Maybe a mixture of stable and unstable ... no idea.

> BTS bug? Still considers the old maintainer as current?

Yes, seems to be. I was a bit surprised to see that.

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
------------------------------------------------------------------------
what does teleport mean?'
Another moment passed.
Slowly, the others turned to face him.
It's just
I remember you use the word a short while ago and I only
bring it up because...'
does it say teleport?'
`Well, just over here in fact,' said Arthur, pointing at a
dark control box in the rear of the cabin, `Just under the
word "emergency", above the word "system" and beside the
sign saying "out of order".'
--- Arthur finding an escape route from a certain death
--- situation.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy

Andreas Beckmann

unread,
May 10, 2012, 10:20:01 PM5/10/12
to
On 2012-05-11 03:49, Norbert Preining wrote:
>> use 'le-nl' unless you want to run this on initial install ($2=""), too
>
> le-nl isn't that << ?

'le-nl' is '<=' with a special case for the empty version "" to be later
than anything (for 'le'/'<=' it's earlier than anything, even '~', see
dpkg(1))

> I guess better is
> if [ -n "$2" ] ; then
> if dpkg --compare-versions "$2" le "2011.20120509-1" ; then

that's equivalent to le-nl, just two more lines :-)

Andreas

Norbert Preining

unread,
May 10, 2012, 10:30:01 PM5/10/12
to
On Fr, 11 Mai 2012, Andreas Beckmann wrote:
> 'le-nl' is '<=' with a special case for the empty version "" to be later
> than anything (for 'le'/'<=' it's earlier than anything, even '~', see
> dpkg(1))

Ugg, true. Learned something new. Was glimpsing at the dpkg manual and
saw only:
..... lt-nl le-nl ge-nl gt-nl. These
are provided only for compatibility with control file syntax:
< << <= = >= >> >.

;-) Thanks.

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
------------------------------------------------------------------------
Prostetnic Vogon Jeltz smiled very slowly. This was done
not so much for effect as because he was trying to remember
the sequence of muscle movements.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy



0 new messages