Bug#954807: apt upgrade sometimes marks packages as manually installed

2020-03-23 Thread Piotr Engelking
Package: apt
Version: 2.0.0
Severity: normal


When a package listed as an argument to apt upgrade is already at the
requested version, it is marked as manually installed:

# apt-mark showmanual libc6
# apt upgrade libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.30-2).
libc6 set to manually installed.
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
# apt-mark showmanual libc6
libc6
#

Please do not mark packages listed as arguments to apt upgrade as
manually installed.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (600, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8),
LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt depends on:
ii  adduser 3.118
ii  debian-archive-keyring  2019.1
ii  gpgv2.2.19-3
ii  libapt-pkg6.0   2.0.0
ii  libc6   2.30-2
ii  libgcc-s1   10-20200312-2
ii  libgnutls30 3.6.12-2
ii  libseccomp2 2.4.3-1
ii  libstdc++6  10-20200312-2

Versions of packages apt recommends:
ii  ca-certificates  20190110

Versions of packages apt suggests:
ii  apt-doc  2.0.0
pn  aptitude | synaptic | wajig  
ii  dpkg-dev 1.19.7
ii  gnupg2.2.19-3
pn  powermgmt-base   

-- no debconf information



Bug#954807: apt upgrade sometimes marks packages as manually installed

2020-03-23 Thread Piotr Engelking
Julian Andres Klode :

> This is not a bug, but a feature. You ran the equivalent of
> apt install libc6 && apt upgrade, and that causes libc6 to be
> manually installed, because you manually requested it to be
> installed.

Hmm... What is the difference between apt install  and apt upgrade
, then? I would naively expect the first to mark the package as
manually installed, and the second not to. Is there a way to to upgrade
a package to a particular release without marking it as manually
installed?

Also, when the package listed as argument to apt upgrade is not at the
requested version, it is not marked as manually installed, exactly as I
would expect.