Public bug reported:

Notable, upon logging in, I get this message:
```
3 packages can be updated.
1 update is a security update.
```

This is fairly misleading, since afaict, the three packages it's listing
as "updated" are in fact "new installs" as opposed to "upgrades".
However, that isn't the primary point of my bug report.

I'm actually relying on that information via:
/usr/lib/update-notifier/apt-check 2>&1|sed -e "s/;.*//"
/usr/lib/update-notifier/apt-check 2>&1|sed -e "s/.*;//"

So, I connect to the box and perform:

`apt upgrade`:
```
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:5 http://debian.neo4j.org/repo stable/ InRelease
Get:6 http://debian.neo4j.org/repo stable/ Release [1479 B]
Get:7 http://debian.neo4j.org/repo stable/ Release.gpg [819 B]
Hit:8 https://repo.zabbix.com/zabbix/4.0/ubuntu bionic InRelease
Fetched 2298 B in 1s (4382 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  libasound2 libasound2-data openjdk-11-jre-headless
The following packages have been kept back:
  cypher-shell
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 37.8 MB of archives.
After this operation, 173 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
```

Apt apparently discovered a newer version of `cypher-shell`. That newer
version requires `openjdk-11-jre-headless`, so it added that to the list
of things to install. That new package requires two additional packages
(`libasound2` and `libasound2-data`). `apt` then discovers that this
newer version of `cypher-shell` conflicts w/ a manually installed
package (`neo4j`). It thus marks `cypher-shell` as `kept-back`,
unfortunately, it doesn't discard its plans to install java11.

For comparison, `apt-get upgrade` just recognizes that it shouldn't upgrade 
`cypher-shell`:
`apt-get upgrade`:
```
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  cypher-shell
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
```

```
lsb_release -rd
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
```

`apt-cache policy apt cypher-shell neo4j openjdk-11-jre-headless:amd64 
openjdk-8-jre-headless:amd64`:
```
apt:
  Installed: 1.6.12
  Candidate: 1.6.12
  Version table:
 *** 1.6.12 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main 
amd64 Packages
        100 /var/lib/dpkg/status
     1.6.6ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 
Packages
     1.6.1 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 
Packages
cypher-shell:
  Installed: 1.1.12
  Candidate: 4.0.0
  Version table:
     4.0.0 500
        500 http://debian.neo4j.org/repo stable/ Packages
 *** 1.1.12 500
        500 http://debian.neo4j.org/repo stable/ Packages
        100 /var/lib/dpkg/status
...
neo4j:
  Installed: 1:3.5.13
  Candidate: 1:3.5.13
  Version table:
 *** 1:3.5.13 500
        500 http://debian.neo4j.org/repo stable/ Packages
        100 /var/lib/dpkg/status
...
openjdk-11-jre-headless:
  Installed: (none)
  Candidate: 11.0.4+11-1ubuntu2~18.04.3
  Version table:
     11.0.4+11-1ubuntu2~18.04.3 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main 
amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 
Packages
        100 /var/lib/dpkg/status
     10.0.1+10-3ubuntu1 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 
Packages
openjdk-8-jre-headless:
  Installed: 8u222-b10-1ubuntu1~18.04.1
  Candidate: 8u222-b10-1ubuntu1~18.04.1
  Version table:
 *** 8u222-b10-1ubuntu1~18.04.1 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu 
bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 
Packages
        100 /var/lib/dpkg/status
     8u162-b12-1 500
        500 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic/universe 
amd64 Packages
```

Expected results: as with `apt-get upgrade`, don't try to install jre11.
Actual results: tries to install jre11 (it does succeed if I say yes, but that 
then breaks some customer software which we manually installed which doesn't 
like java11 -- that's a separate set of bugs, and they aren't packaged, so 
there's no guidance to apt telling it not to do that).

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

** Attachment added: "apport.apt.uanwo708.apport"
   
https://bugs.launchpad.net/bugs/1856613/+attachment/5313066/+files/apport.apt.uanwo708.apport

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856613

Title:
  apt upgrade wants to install openjdk-11-jre-headless without
  upgprading anything

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to