[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: List packages from non-default repositories



On 04/10/2023 15:42, Jörg-Volker Peetz wrote:
$ apt list '~i' | grep -v '/testing'

and

$ apt-show-versions | grep -v '/testing '

show the same packages, correctly, but

$ apt list '~i!~Atesting'

is missing some packages.

It is the reason why I added '?narrow'. Try

   apt list '?any-version(~i!~A^testing)'

For me it is not intuitive that the outer '?any-version()' modifies result of the inner '?and()'.

Actually the expression gives *some* upgradable packages in addition, but not all of them. For the stable release installed libc6 version is available from bookworm/main, but thunderbird-102 has been wiped from bookworm-security, so

apt list '?narrow(~i, ~n"^(thunderbird|libc6)$", !~A^stable)'
Listing... Done
thunderbird/stable-security 1:115.3.1-1~deb12u1 amd64 [upgradable from: 1:102.15.1-1~deb12u1]
N: There are 3 additional versions. Please use the '-a' switch to see them.

skips libc6 however it can be upgraded

apt list '~U~n"^(thunderbird|libc6)$"'
Listing... Done
libc6/stable-security 2.36-9+deb12u3 amd64 [upgradable from: 2.36-9+deb12u1]
thunderbird/stable-security 1:115.3.1-1~deb12u1 amd64 [upgradable from: 1:102.15.1-1~deb12u1]

It took some time for me to figure out what is the difference.

apt policy libc6 thunderbird
libc6:
  Installed: 2.36-9+deb12u1
  Candidate: 2.36-9+deb12u3
  Version table:
     2.37-10 100
        100 http://deb.debian.org/debian trixie/main amd64 Packages
     2.36-9+deb12u3 500
500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
 *** 2.36-9+deb12u1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status
thunderbird:
  Installed: 1:102.15.1-1~deb12u1
  Candidate: 1:115.3.1-1~deb12u1
  Version table:
     1:115.3.1-1~deb12u1 500
500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
     1:115.2.2-1 100
        100 http://deb.debian.org/debian trixie/main amd64 Packages
 *** 1:102.15.1-1~deb12u1 100
        100 /var/lib/dpkg/status
     1:102.13.0-1~deb12u1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages

So either ", !~U" should be added inside "?narrow()" or "| ~U" outside of it, depending on desired result in respect to upgradable packages.


Reply to: