Skip to content

Commit e8e47af

Browse files
authored
Fix agama and libigc versions reporting (#3132)
`libigc2` replaced `libigc1` so we should use it for agama version, but keep `LIBIGC1_VERSION` for backward compatibility. Fixes #3131.
1 parent 3197668 commit e8e47af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/capture-hw-details.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ for arg in "$@"; do
1818
esac
1919
done
2020

21-
if dpkg-query --show libigc1 &> /dev/null; then
21+
if dpkg-query --show libigc2 &> /dev/null; then
22+
export LIBIGC1_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc2 | grep -oP '.+(?=~)')
23+
elif dpkg-query --show libigc1 &> /dev/null; then
2224
export LIBIGC1_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc1 | grep -oP '.+(?=~)')
2325
else
2426
export LIBIGC1_VERSION="Not Installed"
@@ -32,7 +34,9 @@ else
3234
export LEVEL_ZERO_VERSION="Not Installed"
3335
fi
3436

35-
if dpkg-query --show libigc1 &> /dev/null; then
37+
if dpkg-query --show libigc2 &> /dev/null; then
38+
export AGAMA_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc2 | sed 's/.*-\(.*\)~.*/\1/')
39+
elif dpkg-query --show libigc1 &> /dev/null; then
3640
export AGAMA_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc1 | sed 's/.*-\(.*\)~.*/\1/')
3741
else
3842
export AGAMA_VERSION="Not Installed"

0 commit comments

Comments
 (0)