dleidert / openmediavault-upgrade

Script to upgrade openmediavault from one major release into the next
GNU General Public License v3.0
48 stars 1 forks source link

Upgrade fails on plain OMV4.x systems due to pinning issue #7

Closed dleidert closed 3 years ago

dleidert commented 3 years ago

On plain OMV4 systems there is no pinning for the openmediavault package respositories like it was for OMV2 (/etc/apt/preferences.d/openmediavault.pref) and probably OMV3. Thus run.d/80-apt-dist-upgrade might fail to upgrade openmediavault due to not being able to install the required dependencies because pre.d/71-apt-update-apt-conf pins the new Debian release higher:

$ sudo apt-cache policy salt-minion
salt-minion:
Installed: 2018.3.4+dfsg1-6+deb10u1
Candidate: 2018.3.4+dfsg1-6+deb10u1
Version table:
3002.2+ds-1 500
500 http://packages.openmediavault.org/public usul/main amd64 Packages
*** 2018.3.4+dfsg1-6+deb10u1 990
990 https://deb.debian.org/debian buster/main amd64 Packages
990 https://deb.debian.org/debian-security buster/updates/main amd64 Packages
100 /var/lib/dpkg/status
2016.11.2+ds-1+deb9u6 500
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
2016.11.2+ds-1+deb9u4 500
500 http://debian.ethz.ch/debian stretch/main amd64 Packages
dleidert commented 3 years ago

One possible solution would be to run

apt-get dist-upgrade ${THIS_APT_UPGRADE_OPTIONS} || apt-get install -f
apt-get dist-upgrade -t usul ${THIS_APT_UPGRADE_OPTIONS} || apt-get install -f

or to (temporarily) pin the packages from the omv repository higher than the default release:

$ cat /etc/apt/preferences.d/openmediavault.pref
Package: *
Pin: origin packages.openmediavault.org
Pin-Priority: 995
dleidert commented 3 years ago

Fixed