Skip to content

Prevent installation of all available upgrades when installing PR packages

Guido Berhörster requested to merge personal/gberh/no-upgrade into main

Currently, apt full-upgrade is run after adding a PR repo. This will install all available upgrades often with undesired side effects, possibly even breaking installations. Prevent this by adding a temporary apt preferences file which lowers the priority of both UBports and Ubuntu repos below 100. The UBports repo has a higher priority than Ubuntu so packages from there are preferred. This should still allow the installation of new dependencies from both repos but prevent any upgrades not related to the PR. The name of the temporary file starts with "aaa" which should sort before the existing "ubports.pref" and override it. This behavior does not appear to be documented apt_preferences(5) but experimentation shows that in case of two identical rules, the first one to be parsed wins.

This fixes #4 (closed).

Merge request reports