summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-24 22:19:55 +0100
committerSam James <sam@gentoo.org>2022-05-24 22:19:55 +0100
commit6b049d6c5c65706a11c321f7a73ba02cddba6d5e (patch)
tree9350194c654e170704342af90b9358ed7ed9b070 /sys-apps
parentsys-apps/pciutils: add min BDEPEND on linker too (diff)
downloadgentoo-6b049d6c5c65706a11c321f7a73ba02cddba6d5e.tar.gz
gentoo-6b049d6c5c65706a11c321f7a73ba02cddba6d5e.tar.bz2
gentoo-6b049d6c5c65706a11c321f7a73ba02cddba6d5e.zip
sys-apps/pciutils: add regex for LD version to be safe
To avoid ver_cut dying if something odd gets in there. Bug: https://bugs.gentoo.org/847133 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/pciutils/pciutils-3.8.0.ebuild7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-apps/pciutils/pciutils-3.8.0.ebuild b/sys-apps/pciutils/pciutils-3.8.0.ebuild
index 9cc012fc6893..e92c695e88d3 100644
--- a/sys-apps/pciutils/pciutils-3.8.0.ebuild
+++ b/sys-apps/pciutils/pciutils-3.8.0.ebuild
@@ -58,6 +58,13 @@ check_binutils_version() {
# 2.38
# ```
local ver=$($(tc-getLD) --version 2>&1 | head -1 | rev | cut -d' ' -f1 | rev)
+
+ if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
+ # Skip if unrecognised format so we don't pass something
+ # odd into ver_cut.
+ return
+ fi
+
ver_major=$(ver_cut 1 "${ver}")
ver_minor=$(ver_cut 2 "${ver}")