summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-09-16 03:09:36 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-09-16 03:17:12 -0400
commit078ce27583a9cf5635164e48db28c92e62203c75 (patch)
tree48079a4a7050bee2cb11351282cefadd7c276b20 /app-portage/iwdevtools
parentapp-portage/iwdevtools: drop 0.12.11 (diff)
downloadgentoo-078ce27583a9cf5635164e48db28c92e62203c75.tar.gz
gentoo-078ce27583a9cf5635164e48db28c92e62203c75.tar.bz2
gentoo-078ce27583a9cf5635164e48db28c92e62203c75.zip
app-portage/iwdevtools: backport workaround for tests
Could've done a new release but there is no other commits and nothing is actually broken beside the tests themselves. Can at least spare some users from having to look at what's new for nothing after a release announcement. Closes: https://bugs.gentoo.org/939721 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-portage/iwdevtools')
-rw-r--r--app-portage/iwdevtools/files/iwdevtools-0.12.12-category-tests.patch79
-rw-r--r--app-portage/iwdevtools/iwdevtools-0.12.12.ebuild4
2 files changed, 83 insertions, 0 deletions
diff --git a/app-portage/iwdevtools/files/iwdevtools-0.12.12-category-tests.patch b/app-portage/iwdevtools/files/iwdevtools-0.12.12-category-tests.patch
new file mode 100644
index 000000000000..9f8645f614d4
--- /dev/null
+++ b/app-portage/iwdevtools/files/iwdevtools-0.12.12-category-tests.patch
@@ -0,0 +1,79 @@
+https://bugs.gentoo.org/939721
+https://github.com/ionenwks/iwdevtools/commit/4f3c463af0af4f62317f2117580e57beed3435b0
+From: Ionen Wolkens <ionen@gentoo.org>
+Date: Mon, 16 Sep 2024 02:48:31 -0400
+Subject: [PATCH] tests: work around portage confusion by passing dev-test/
+
+In theory portage should be ignoring ::gentoo (different repos.conf
+which does not specify /var/db/repos/gentoo and changes main-repo),
+but seems it gets confused by a package named "test" existing still
+resulting in:
+
+ You specified an unqualified atom that matched multiple packages:
+ * dev-test/test
+ * dev-python/test
+
+Whether category is passed or not is not important in env-atom and
+*-perms (so can just do it), but in "qa-cmp/pick" it was omitted on
+a few tests to test the missing category logic.
+
+So we lose that extra bit until can figure out a way for portage to
+actually ignore ::gentoo. Not passing the category is however rarely
+done given the portage bashrc hook passes it, this is for when using
+qa-cmp directly and being brief with arguments.
+--- a/tests/eoldnew/env-atom
++++ b/tests/eoldnew/env-atom
+@@ -8,3 +8,3 @@ export EOLDNEW_EMERGE_ARGS_NEW="--new {}"
+ export EOLDNEW_EMERGE_CMD=:
+-expect -s "*'running: : =dev-test/test-1.5 --all test --more test --old test
+-running: : test --all test --more test --new test'*" test
++expect -s "*'running: : =dev-test/test-1.5 --all dev-test/test --more dev-test/test --old dev-test/test
++running: : dev-test/test --all dev-test/test --more dev-test/test --new dev-test/test'*" dev-test/test
+--- a/tests/qa-cmp/diff-filelist-perms
++++ b/tests/qa-cmp/diff-filelist-perms
+@@ -9,6 +9,6 @@ expect -s "*'
+ FILES:+usr/bin/file2 (-rw-r--r-- '*:*')
+-'*'FILES(+1,-2)'*" -c test
++'*'FILES(+1,-2)'*" -c dev-test/test
+ expect -s "*'
+ FILES:-usr/bin/file3
+-'*'FILES(-1)'*" -c --ignore-perms test
++'*'FILES(-1)'*" -c --ignore-perms dev-test/test
+ expect -s "*'
+@@ -17,3 +17,3 @@ expect -s "*'
+ FILES:+usr/bin/file2 (-rw-r--r-- '*:*')
+-'*'FILES(+1,-2)'*" -c --show-perms test
++'*'FILES(+1,-2)'*" -c --show-perms dev-test/test
+
+@@ -23,2 +23,2 @@ expect -s "*'
+ FILES:-usr/bin/file3
+-'*'FILES(-1)'*" -c test
++'*'FILES(-1)'*" -c dev-test/test
+--- a/tests/qa-cmp/pick
++++ b/tests/qa-cmp/pick
+@@ -12,7 +12,10 @@ expect "*test-3.5*test-4.5*" -cW dev-test/test
+ expect "*test-1.5*test-3.5*" -cW dev-test/test:2
+-expect "*test-4.5*test-3.5*" -cW test =test-3.5
++expect "*test-4.5*test-3.5*" -cW dev-test/test =dev-test/test-3.5 # *1
+ expect "*test-1.5*test-3.5*" -cW dev-test/test:2 =dev-test/test-3.5
+-expect "*test-2.5*test-4.5*" -cW test:0 =test-4.5
+-expect "*alt-1.5/image*test-4.5*" -cW alt test # nonsense but allowed
+-expect "*=dev-test/alt-1.5*alt-1.5/image*" -cW alt
++expect "*test-2.5*test-4.5*" -cW dev-test/test:0 =dev-test/test-4.5 # *1
++expect "*alt-1.5/image*test-4.5*" -cW dev-test/alt dev-test/test # nonsense but allowed, *1
++expect "*=dev-test/alt-1.5*alt-1.5/image*" -cW dev-test/alt # *1
++# *1: meant to have these tests with unspecified category to test the category
++# logic, but portage gets confused by ::gentoo (https://bugs.gentoo.org/939721)
++
+ # FIXME:
+--- a/tests/qa-cmp/single-perms
++++ b/tests/qa-cmp/single-perms
+@@ -6,3 +6,3 @@ expect -s "*'
+ FILES: usr/bin/file1 (-rwxr-xr-x '*:*')
+- FILES: usr/bin/file2 (-rw-r--r-- '*:*')'*" -c --single-all --show-perms test
++ FILES: usr/bin/file2 (-rw-r--r-- '*:*')'*" -c --single-all --show-perms dev-test/test
+
+@@ -11,2 +11,2 @@ expect -s "*'
+ FILES: usr/bin/file1 (-rwxr-xr-x '*:*')
+- FILES: usr/bin/file2 (?)'*" -c --single-all --show-perms test
++ FILES: usr/bin/file2 (?)'*" -c --single-all --show-perms dev-test/test
diff --git a/app-portage/iwdevtools/iwdevtools-0.12.12.ebuild b/app-portage/iwdevtools/iwdevtools-0.12.12.ebuild
index 50a983e156b9..e590c0eec548 100644
--- a/app-portage/iwdevtools/iwdevtools-0.12.12.ebuild
+++ b/app-portage/iwdevtools/iwdevtools-0.12.12.ebuild
@@ -35,6 +35,10 @@ BDEPEND="
test? ( ${RDEPEND} )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-category-tests.patch
+)
+
src_configure() {
local emesonargs=(
-Ddocdir=${PF}