From 73f7408f6d164e595fb2e3a3df856a8f8168fcb9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 13 Jan 2023 12:23:43 +0100 Subject: make ?installed pattern match installed version only when narrowed This is the correct behavior, but it was overlooked when aptitude patterns where ported. I remember wondering about this, but I checked the aptitude code and saw a check that CurrentVer != 0 or something and then apparently did not notice another implementation for version matching. --- test/integration/test-apt-patterns | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index 7f202710c..85370aee8 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -191,6 +191,12 @@ available/unstable 1.0 all conf-only/now 1.0 i386 [residual-config] foreign/unstable 2.0 amd64" apt list '?not(?installed)' +testsuccessequal "Listing... +not-obsolete/unstable 2.0 i386 [upgradable from: 1.0] +N: There is 1 additional version. Please use the '-a' switch to see it" apt list '?installed?exact-name(not-obsolete)?version(2.0)' + +testsuccessequal "Listing..." apt list '?narrow(?installed?exact-name(not-obsolete)?version(2.0))' + testsuccessequal "Listing... automatic1/now 1.0 i386 [installed,local] automatic2/now 1.0 i386 [installed,local]" apt list '?name(^automatic)' -- cgit v1.2.3-70-g09d2