HomeFreeBSD

pkgbase: improve pkg --version parsing

Description

pkgbase: improve pkg --version parsing

In some cases pkg --version might produce unexpected or additional
output. Use a regex /^[0-9.]+$/ to match only the line containing the
version number.

Reported by: Michael Butler on freebsd-current@
Fixes: 4e224e4be7c3 ("pkgbase: accommodate pkg < 1.17")
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on Jul 28 2021, 8:02 PM
Parents
rG5a49f1914178: Do not expose to scheduler caches of single CPU.
Branches
Unknown
Tags
Unknown