Apt policy output changed between Ubuntu 19.10 and 20.04

Asked by corrado venturini

I used command 'apt policy' to check package version.
apt policy package-name with a generic name worked well in Ubuntu 19.10 with apt 3.34.0-1ubuntu1
while generic name is ignored in Ubuntu 20.04 with apt 3.35.91-0ubuntu1

'apt-cache policy' works as usual in 19.10 and 20.04

thanks for your attention

corrado@corrado-x4-ff-1222:~$ uname -a
Linux corrado-x4-ff-1222 5.4.0-14-generic #17-Ubuntu SMP Thu Feb 6 22:47:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
corrado@corrado-x4-ff-1222:~$ apt policy gsettings-desktop-*
N: Unable to locate package gsettings-desktop-*
corrado@corrado-x4-ff-1222:~$ apt policy gsettings-desktop-schemas
gsettings-desktop-schemas:
  Installed: 3.35.91-0ubuntu1
  Candidate: 3.35.91-0ubuntu1
  Version table:
 *** 3.35.91-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages
        100 /var/lib/dpkg/status
corrado@corrado-x4-ff-1222:~$ apt policy apt
apt:
  Installed: 1.9.10
  Candidate: 1.9.10
  Version table:
 *** 1.9.10 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
corrado@corrado-x4-ff-1222:~$

The same command command worked well in Ubuntu 19.10 apt 3.34.0-1ubuntu1

corrado@corrado-x2-eoan:~$ uname -a
Linux corrado-x2-eoan 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
corrado@corrado-x2-eoan:~$ apt policy gsettings-desktop*
gsettings-desktop-schemas:
  Installed: 3.34.0-1ubuntu1
  Candidate: 3.34.0-1ubuntu1
  Version table:
 *** 3.34.0-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu eoan/main i386 Packages
        100 /var/lib/dpkg/status
gsettings-desktop-schemas-dev:
  Installed: (none)
  Candidate: 3.34.0-1ubuntu1
  Version table:
     3.34.0-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
corrado@corrado-x2-eoan:~$ apt policy apt
apt:
  Installed: 1.9.4
  Candidate: 1.9.4
  Version table:
 *** 1.9.4 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
        100 /var/lib/dpkg/status
corrado@corrado-x2-eoan:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

https://launchpad.net/ubuntu/+source/apt/+changelog tells for version 1.9.6
 * apt(8): Disable regular expressions and fnmatch

And the following is shown in the diff:
+apt (1.9.6) experimental; urgency=medium
+
+ apt(8) no longer treats package names passed as regular expressions or fnmatch
+ expressions, requiring the use of patterns (apt-patterns(5)) to perform complex
+ searches. For ease of use, regular expressions starting with ^ or ending with
+ $ continue to work.

(Remark, you mixed up versions numbers, there is no "apt 3.34.0-1ubuntu1" in Ubuntu 19.10.)

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#2

Remember. Focal isn't ready so please report bugs rather than questions for prereleases

Revision history for this message
corrado venturini (corradoventu) said :
#3

Thanks actionparsnip, that solved my question.