zabbly / incus

Incus package repository
176 stars 14 forks source link

Apparently upgrade on SID fails #37

Closed mcondarelli closed 3 months ago

mcondarelli commented 3 months ago

Hi, standard upgrade on fully updated Debian Sid fails:

mcon@cinderella:~/Downloads$ sudo apt update && sudo apt upgrade
Hit:1 http://download.zerotier.com/debian/bookworm bookworm InRelease
Hit:2 http://deb.anydesk.com all InRelease                                                                                                                                    
Hit:4 http://deb.debian.org/debian sid InRelease                                                                                                                              
Hit:5 https://repo.skype.com/deb stable InRelease                                                                                                                             
Hit:6 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                            
Hit:3 https://packages.microsoft.com/repos/code stable InRelease                                                          
Hit:7 https://pkgs.zabbly.com/incus/stable bookworm InRelease                                       
Hit:8 https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  node-mathjax-full node-mj-context-menu node-speech-rule-engine
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  incus incus-client
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
mcon@cinderella:~/Downloads$ sudo apt dist-upgrade 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  node-mathjax-full node-mj-context-menu node-speech-rule-engine xdelta3
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  incus-base
The following NEW packages will be installed:
  incus-agent libcowsql0 libraft0
The following packages will be upgraded:
  incus incus-client
2 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/25.9 MB of archives.
After this operation, 216 MB disk space will be freed.
Do you want to continue? [Y/n] 
Reading changelogs... Done
(Reading database ... 645601 files and directories currently installed.)
Preparing to unpack .../incus_6.0.0-1_amd64.deb ...
Unpacking incus (6.0.0-1) over (6.0-202404040314-debian12) ...
dpkg: error processing archive /var/cache/apt/archives/incus_6.0.0-1_amd64.deb (--unpack):
 trying to overwrite '/etc/default/incus', which is also in package incus-base 6.0-202404040314-debian12
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/incus_6.0.0-1_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is this some misconfig on my side?

mcondarelli commented 3 months ago

Answering my own post: Debian Sid standard repositories now include incus (6.0.0-1) and thus the old zabbly repository is no longer needed. Due to some changes in repo structure it seems impossible to do a direct upgrade. Correct procedure (for me) was:

I hope this kind of workaround won't be necessary when incus hits Debianstable.

stgraber commented 3 months ago

Ah yeah, mixing both the native packages and the extra repo will lead to interesting issues.

This is going to go away next month with Incus 6.1 as Debian will stick to 6.0.x, so the repo will have a higher version.

mcondarelli commented 3 months ago

I would suggest to modify the names on zabbly (e.g.: incus-live, incus-edge or something similar) to prevent confusing apt. Relying on release number to discriminate doesn't seem very robust.

antifob commented 3 months ago

I resolved this by increasing the priority of zabbly packages

# cat /etc/apt/preferences.d/incus
Package: incus*
Pin: origin pkgs.zabbly.com
Pin-Priority: 999

Maybe ship such a file with packages to override the distros?

mcondarelli commented 3 months ago

Just my 2¢ IMHO having two different packages, containing similar things and having the same name is a recipe for disaster.