[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to obtain current package version number?



On Tue, 4 Mar 2003 07:16:11 -0600, Graham Wilson <bob@decoy.wox.org>
wrote:
>On Tue, Mar 04, 2003 at 01:41:58PM +0100, Marc Haber wrote:
>> 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.
>
>dpkg -l PACKAGE | awk '$2 ~ /PACKAGE/ { print $3 }'

Well, I just said that I consider foo to be bad overkill, and you
proceed to posting foo without any comment? Gee, this is what I
consider helpful.

>> Does a maintainer script know the package version, so that it can
>> write the version number to a file?
>
>see policy section 6 for the ways in which maintainer scripts are
>called.

Well, I wouldn't have posted without first consulting policy and
developer's reference. Section 6.4 doesn't seem to document any
maintainer script of the package being installed being called with the
new version number as a parameter, so I was actually hoping that dpkg
sends that information in the environment or somewhere else.

Maybe I have missed something, but again, simply hurling an
unspecified pointer to the docs doesn't help.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29



Reply to: