Skip to content

Commit

Permalink
Fix agama and libigc versions reporting (#3132)
Browse files Browse the repository at this point in the history
`libigc2` replaced `libigc1` so we should use it for agama version, but
keep `LIBIGC1_VERSION` for backward compatibility.

Fixes #3131.
  • Loading branch information
pbchekin authored Jan 9, 2025
1 parent 3197668 commit e8e47af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/capture-hw-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ for arg in "$@"; do
esac
done

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

if dpkg-query --show libigc1 &> /dev/null; then
if dpkg-query --show libigc2 &> /dev/null; then
export AGAMA_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc2 | sed 's/.*-\(.*\)~.*/\1/')
elif dpkg-query --show libigc1 &> /dev/null; then
export AGAMA_VERSION=$(dpkg-query --show --showformat='${version}\n' libigc1 | sed 's/.*-\(.*\)~.*/\1/')
else
export AGAMA_VERSION="Not Installed"
Expand Down

0 comments on commit e8e47af

Please sign in to comment.