lib.distros.debian.Distro._install(): Protect installed pkgs #171
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20261108-lib-distros-debian-distro-install-protect-installed-pkgs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lib.distros.debian.Distro._install(): Protect installed pkgs
apt 3.x distinguishes versions with the same version number by their control metadata, so a
.debinstalled with dpkg -i that differs from the repository's same-version package is regarded as a separate version, and apt-get install of the package nameupgradesit to the repository version, replacing the installed package. If the installed package was built from the source code repo's master, this is effectively a downgrade and can break a CI run in currently unintended ways.This commit detects same-version packages in apt-get's install todo list by running apt-get -s install (simulate installation), parsing the output, and removing those packages from the command line of the subsequent, real install command.