Re: How to obtain current package version number?
En réponse à Marc Haber <mh+debian-mentors@zugschlus.de>:
> Hi,
Hi,
> how can a package learn about its current version number?
>
> Parsing /usr/share/doc/$PACKAGE/changelog.gz is out of the question
> since /usr/share/doc need not be present, and calling dpkg --list
> $PACKAGE and parsing its output looks like bad overkill.
>
> Does a maintainer script know the package version, so that it can
> write the version number to a file?
IIRC you can get it from the postinst parameters. You can have a look
to the policy, in maintainers scripts section.
Cheers,
--
Jérôme Marant <jerome@marant.org>
<jerome.marant@free.fr>
http://marant.org
Reply to: