summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-03-16 10:02:00 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-03-16 10:21:06 -0400
commitfcdde1d0bc3279dacc5bf25aed059b8b40b1efef (patch)
treec4d71462bd520c245b7d0c854819e74d721f80e8 /app-portage/iwdevtools
parentwww-client/chromium: stable channel bump to 99.0.4844.74 (diff)
downloadgentoo-fcdde1d0bc3279dacc5bf25aed059b8b40b1efef.tar.gz
gentoo-fcdde1d0bc3279dacc5bf25aed059b8b40b1efef.tar.bz2
gentoo-fcdde1d0bc3279dacc5bf25aed059b8b40b1efef.zip
app-portage/iwdevtools: backport diff output fix
Another short fix, leaving releases for later and going straight to stable. Kind of important fix, in some rare'ish cases a line may not have been displayed leading to missed information. So new output may be available. Thanks-to: Joonas Niilola <juippis@gentoo.org> Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-portage/iwdevtools')
-rw-r--r--app-portage/iwdevtools/files/iwdevtools-0.10.1-diff-off-by-one.patch20
-rw-r--r--app-portage/iwdevtools/iwdevtools-0.10.1-r2.ebuild (renamed from app-portage/iwdevtools/iwdevtools-0.10.1-r1.ebuild)1
2 files changed, 21 insertions, 0 deletions
diff --git a/app-portage/iwdevtools/files/iwdevtools-0.10.1-diff-off-by-one.patch b/app-portage/iwdevtools/files/iwdevtools-0.10.1-diff-off-by-one.patch
new file mode 100644
index 000000000000..87564b0b1445
--- /dev/null
+++ b/app-portage/iwdevtools/files/iwdevtools-0.10.1-diff-off-by-one.patch
@@ -0,0 +1,20 @@
+https://github.com/ionenwks/iwdevtools/commit/74d7b913a9bea5cfbf59e451d8db4a4c6140cba8
+From: Ionen Wolkens <ionen@gentoo.org>
+Date: Wed, 16 Mar 2022 09:51:00 -0400
+Subject: [PATCH] qa-vdb: fix off-by-one in diff output
+
+This wrongly assumed f1 array was always at least as big as f2
+
+--- a/scripts/qa-vdb
++++ b/scripts/qa-vdb
+@@ -203,8 +203,8 @@ vdb-get_libdiff() {
+ # create combined output
+ local -i len=0
+ local o mark changes=false
+- for ((i=0; i < ${#f1[@]}; i++)); do
+- : "${f2[i]:=}"
++ for ((i=0; i < (${#f1[@]}>${#f2[@]}?${#f1[@]}:${#f2[@]}); i++)); do
++ : "${f1[i]:=}${f2[i]:=}"
+ if [[ ${f1[i]} == "${f2[i]}" ]]; then
+ ${O[full]} || continue
+ mark=' '
diff --git a/app-portage/iwdevtools/iwdevtools-0.10.1-r1.ebuild b/app-portage/iwdevtools/iwdevtools-0.10.1-r2.ebuild
index bc84297f29a9..c4d90017aac1 100644
--- a/app-portage/iwdevtools/iwdevtools-0.10.1-r1.ebuild
+++ b/app-portage/iwdevtools/iwdevtools-0.10.1-r2.ebuild
@@ -29,6 +29,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-ldpath-regression.patch
+ "${FILESDIR}"/${P}-diff-off-by-one.patch
)
src_configure() {