app-portage/version
From Gentoo Wiki
Version command is a recently creation with two targets in mind,
- get version infomation of a package.
- operate with version of a package.
To install the program just add the guru repository
root #
layman -a guru
or
root #
eselect repository enable guru
root #
emaint sync -r guru
Next install the with
root #
emerge --ask app-portage/version
naturaly there is a option'help'
user $
version -h
will display few acceptable formats for the inputs
to get version information of gentoolkit package use:
user $
version -g app-portage/gentoolkit
0.5.0
is possible check if the version is more small what 1.0
user $
version -c app-portage/gentoolkit s= 1.0
true
or (if the shell accept a more frendly sintax)
user $
version -c app-portage/gentoolkit <= 1.0
true
a more descriptive output can be enable with 'i' option
user $
version -ci app-portage/gentoolkit s= 1.0
app-portage/gentoolkit : pass(0.5.0)
there is a option for get platform identification
user $
version -p
Portage
a more complex script can be found on example directory