Bug#712895: json_pp.1.bundled.gz: ignoring bogus filename
gregor herrmann
gregoa at debian.org
Fri Oct 10 11:29:27 UTC 2014
On Thu, 09 Oct 2014 17:19:51 +0200, Dominique Dumont wrote:
> I think the cause is in the preinst script:
>
> dpkg-divert --add --package libjson-pp-perl --rename \
> --divert /usr/share/man/man1/json_pp.1.bundled.gz
> /usr/share/man/man1/json_pp.1.gz
>
> I think json_pp.1.gz should be diverted to json_pp_bundled.1.gz
Or json_pp.bundled.1.gz, from looking at other examples:
% grep "bundled.*gz" */debian/*preinst
libcpanplus-perl/debian/preinst: --divert /usr/share/man/man1/cpanp.bundled.1.gz /usr/share/man/man1/cpanp.1.gz
libcpanplus-perl/debian/preinst: --divert /usr/share/man/man1/cpan2dist.bundled.1.gz /usr/share/man/man1/cpan2dist.1.gz
libdevel-dprof-perl/debian/preinst: --divert /usr/share/man/man1/dprofpp.bundled.1.gz /usr/share/man/man1/dprofpp.1.gz
libdigest-sha-perl/debian/libdigest-sha-perl.preinst: --divert /usr/share/man/man1/shasum.bundled.1.gz /usr/share/man/man1/shasum.1.gz
libextutils-parsexs-perl/debian/preinst: --divert /usr/share/man/man1/xsubpp.bundled.1.gz /usr/share/man/man1/xsubpp.1.gz
libjson-pp-perl/debian/preinst: --divert /usr/share/man/man1/json_pp.1.bundled.gz /usr/share/man/man1/json_pp.1.gz
libmodule-corelist-perl/debian/libmodule-corelist-perl.preinst: --divert /usr/share/man/man1/corelist.bundled.1.gz /usr/share/man/man1/corelist.1.gz
libpod-latex-perl/debian/preinst: --divert /usr/share/man/man1/pod2latex.bundled.1.gz /usr/share/man/man1/pod2latex.1.gz
> Now that the cat is out of the bag, fixing this is tricky because the upgrade
> need to remove the old divert and install the new one.
>
> Dom, do you know how to do this ?
Hm.
I just tried the command from the postrm:
dpkg-divert --remove --package libjson-pp-perl --rename --divert /usr/share/man/man1/json_pp.1.bundled.gz /usr/share/man/man1/json_pp.1.gz
several times. It seems to be idempotent, i.e. always returns with 0.
(Just the output is different when
/usr/share/man/man1/json_pp.1.bundled.gz is already gone.)
So we could just stick it into preinst.
If that's too ugly we could guard it with
- either the usual version check:
if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" le $someversion
- or by checking if the diversion is there with something like
if dpkg-divert --list /usr/share/man/man1/json_pp.1.bundled.gz | grep -q "json_pp.1.bundled.gz"
Cheers,
gregor
--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: U2: Red light
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20141010/660e783f/attachment.sig>
More information about the pkg-perl-maintainers
mailing list