tidy version reported in `lb config --dump`

live-build might be run from a local folder rather than the system
installation, so the dpkg version number should not override the version
picked up from VERSION

if we care about the possibility of the installed package version
potentially differing from the version of the git checkout, or
whatever, then this should be printed alongside it, as now done.

Gbp-Dch: Ignore

[Raphaël Hertzog: tweak to apply on top of my changes]
This commit is contained in:
Lyndon Brown 2020-04-02 12:12:54 +01:00 committed by Raphaël Hertzog
parent e71db2bd58
commit fb41c19009
1 changed files with 3 additions and 6 deletions

View File

@ -211,14 +211,11 @@ Local_arguments ()
--dump)
# Dump version
local VERSION_DPKG
if [ $(which dpkg-query) ]
then
VERSION_DPKG="$(dpkg-query -f='${Version}' --show live-build)"
Echo "This is live-build version %s" "${VERSION}"
if [ $(which dpkg-query) ]; then
Echo "Installed version reported by dpkg is %s" "$(dpkg-query -f='${Version}' --show live-build)"
fi
Echo "%s: This is live-build version %s" "${0}" "${VERSION_DPKG:-${VERSION}}"
# Dump conffile contents
Print_conffiles $(Common_config_files)