aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-12-19 10:51:16 +0100
committerFabian Groffen <grobian@gentoo.org>2021-12-19 10:51:16 +0100
commit74b75c453354a10af3c499aac15d3a2ae0e1c7ee (patch)
tree4f0598f2854155520e5e29caf5618c0cc833b852 /tests
parenttests/source: remove some checks (diff)
downloadportage-utils-74b75c453354a10af3c499aac15d3a2ae0e1c7ee.tar.gz
portage-utils-74b75c453354a10af3c499aac15d3a2ae0e1c7ee.tar.bz2
portage-utils-74b75c453354a10af3c499aac15d3a2ae0e1c7ee.zip
qlist: fix matching of USE-flags
Thanks to Michael Yagliyan for finding this bug and proposing the fix. We cannot perform merge-sort if the comparison in use is different between sorting and processing afterwards. Use case-sensitive sort everywhere, for it is cheaper, matches Portage and is safer/more correct/inline with PMS. This does change the default output ordering of the flags though. Added a test that ensures capital USE-flag is now matched correctly. Bug: https://bugs.gentoo.org/829579 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qlist/dotest3
-rw-r--r--tests/qlist/root/sys-fs/mtools-4.0.13/IUSE1
-rw-r--r--tests/qlist/root/sys-fs/mtools-4.0.13/USE1
3 files changed, 5 insertions, 0 deletions
diff --git a/tests/qlist/dotest b/tests/qlist/dotest
index 0bb031b9..509a20d0 100755
--- a/tests/qlist/dotest
+++ b/tests/qlist/dotest
@@ -70,6 +70,9 @@ test 15 1 "qlist -ICv lajsdflkjasdflkjasdfljasdf"
# match test w/out sub-SLOT
test 16 0 "qlist -ICSS virtual/sub-2:1"
+# check USE retrieval
+test 17 0 "qlist -IUv mtools"
+
cleantmpdir
end
diff --git a/tests/qlist/root/sys-fs/mtools-4.0.13/IUSE b/tests/qlist/root/sys-fs/mtools-4.0.13/IUSE
new file mode 100644
index 00000000..a834dceb
--- /dev/null
+++ b/tests/qlist/root/sys-fs/mtools-4.0.13/IUSE
@@ -0,0 +1 @@
+X static-libs abi_x86_32 abi_x86_64
diff --git a/tests/qlist/root/sys-fs/mtools-4.0.13/USE b/tests/qlist/root/sys-fs/mtools-4.0.13/USE
new file mode 100644
index 00000000..c91abd8e
--- /dev/null
+++ b/tests/qlist/root/sys-fs/mtools-4.0.13/USE
@@ -0,0 +1 @@
+abi_x86_64 elibc_SunOS kernel_SunOS prefix X