Public bug reported:

If an update for a package is available but not installed, simulating a
purge shows the wrong version.

On that 20.04 system, an update to libxml2 2.9.10+dfsg-5ubuntu0.20.04.4
was available but only the ".3" one was installed. Simulating a purge
gives this bogus output (with `APT::Get::Show-Versions "true"`):

$ apt-get autopurge -s libxml2
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
   libicu66* (66.1-2ubuntu2.1)
   libxml2* (2.9.10+dfsg-5ubuntu0.20.04.4)
   shared-mime-info* (1.15-1)
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Purg shared-mime-info [1.15-1]
Purg libxml2 [2.9.10+dfsg-5ubuntu0.20.04.3]
Purg libicu66 [66.1-2ubuntu2.1]

In the above, the "REMOVED" section shows the wrong version number but
the simulation part is OK.


# Additional information

Note: libxml2's update was applied before checking the policy.

$ apt-cache policy apt libxml2
apt:
  Installed: 2.0.9
  Candidate: 2.0.9
  Version table:
 *** 2.0.9 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
        100 /var/lib/dpkg/status
     2.0.2ubuntu0.2 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     2.0.2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
libxml2:
  Installed: 2.9.10+dfsg-5ubuntu0.20.04.4
  Candidate: 2.9.10+dfsg-5ubuntu0.20.04.4
  Version table:
 *** 2.9.10+dfsg-5ubuntu0.20.04.4 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.9.10+dfsg-5 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

$ lsb_release -sd
Ubuntu 20.04.4 LTS

** Affects: apt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1983981

Title:
  Wrong package version displayed in action summary if update is
  available

Status in apt package in Ubuntu:
  New

Bug description:
  If an update for a package is available but not installed, simulating
  a purge shows the wrong version.

  On that 20.04 system, an update to libxml2
  2.9.10+dfsg-5ubuntu0.20.04.4 was available but only the ".3" one was
  installed. Simulating a purge gives this bogus output (with
  `APT::Get::Show-Versions "true"`):

  $ apt-get autopurge -s libxml2
  NOTE: This is only a simulation!
        apt-get needs root privileges for real execution.
        Keep also in mind that locking is deactivated,
        so don't depend on the relevance to the real current situation!
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages will be REMOVED:
     libicu66* (66.1-2ubuntu2.1)
     libxml2* (2.9.10+dfsg-5ubuntu0.20.04.4)
     shared-mime-info* (1.15-1)
  0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
  Purg shared-mime-info [1.15-1]
  Purg libxml2 [2.9.10+dfsg-5ubuntu0.20.04.3]
  Purg libicu66 [66.1-2ubuntu2.1]

  In the above, the "REMOVED" section shows the wrong version number but
  the simulation part is OK.

  
  # Additional information

  Note: libxml2's update was applied before checking the policy.

  $ apt-cache policy apt libxml2
  apt:
    Installed: 2.0.9
    Candidate: 2.0.9
    Version table:
   *** 2.0.9 500
          500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       2.0.2ubuntu0.2 500
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
       2.0.2 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
  libxml2:
    Installed: 2.9.10+dfsg-5ubuntu0.20.04.4
    Candidate: 2.9.10+dfsg-5ubuntu0.20.04.4
    Version table:
   *** 2.9.10+dfsg-5ubuntu0.20.04.4 500
          500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
          100 /var/lib/dpkg/status
       2.9.10+dfsg-5 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

  $ lsb_release -sd
  Ubuntu 20.04.4 LTS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1983981/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to