`apt-get -s upgrade` calculates the upgrade differently depending on whether InRelease files are present in the cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
# Background
I have an in-house package manager that downloads packages from mirrors in parallel and maintains a versioned local repo. It has worked well since 2019. However, during a recent migration from 18.04 to 22.04 I encountered a strange bug: the install step keeps failing because the download step has missed the following packages: xserver-common xserver-xorg-core and xserver-
# How to reproduce
1. Launch a virtual machine with `xubuntu-
2. Download `minimal.tar.xz` at https:/
3. Replace the content of /etc/apt/
```
deb file:/home/apt/repo jammy main universe multiverse restricted
deb file:/home/apt/repo jammy-security main universe multiverse restricted
deb file:/home/apt/repo jammy-updates main universe multiverse restricted
```
4. run `apt-get -s -o Dir::State:
```
The following packages have been kept back:
linux-
...
123 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
```
5. `rm /some/dir/
```
The following packages have been kept back:
linux-
...
120 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
```
# Desired behavior
`apt-get -s` should produce consistent results regardless of whether InRelease files are present in the cache.
tags: | added: jammy |
description: | updated |
Deleting InRelease files from the repository is not supported. The release file is mandatory for phased update support to correctly ignore phasing for security updates, as it identifies security repositories based on the Archive: field in the InRelease file.