Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.
Problem to solve
Preparing to unpack .../gitlab-runner-helper-images_17.7.0-1_all.deb ...
Unpacking gitlab-runner-helper-images (17.7.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/gitlab-runner-helper-images_17.7.0-1_all.deb (--unpack):
trying to overwrite '/usr/lib/gitlab-runner/helper-images/prebuilt-ubuntu-x86_64-pwsh.tar.xz', which is also in package gitlab-runner 17.6.0-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../gitlab-runner_17.7.0-1_amd64.deb ...
Unpacking gitlab-runner (17.7.0-1) over (17.6.0-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-runner-helper-images_17.7.0-1_all.deb
Problem is caused by introducing a new package taking over files from an existing package without declaring Replaces: gitlab-runner (<< 17.7) (exact version needs to be determined) and equivalent Breaks:. See also the Debian Policy Manual, chapter 7.6 (no link provided because of restriction banning me from posting) .
Steps to reproduce
apt upgrade from 17.6.0-1 to 17.7.0-1
Configuration
gitlab-runner on Debian bookworm.
Versions
Please add an x whether options apply, and add the version information.
Self-managed
GitLab.com SaaS
Dedicated
Versions
GitLab (Web: /help or self-managed system information sudo gitlab-rake gitlab:env:info):
Helpful resources
Check the FAQ for helpful documentation, issues/bugs/feature proposals, and troubleshooting tips.
Before opening a new topic, make sure to search for keywords in the forum search
Check the GitLab project for existing issues. If you encounter a bug, please create a bug report issue.
Review existing troubleshooting docs.
Thanks for taking the time to be thorough in your request, it really helps!
I can confirm this, we had the same issue tonight, running Debian Bookworm.
dpkg: error processing archive /var/cache/apt/archives/gitlab-runner-helper-images_17.7.0-1_all.deb (--unpack):
trying to overwrite '/usr/lib/gitlab-runner/helper-images/prebuilt-ubuntu-x86_64-pwsh.tar.xz', which is also in package gitlab-runner 17.6.0-1
Thanks! Same issue here on Ubuntu as well. Our systems auto-upgraded on December 19th and then the services went offline as the systemd unit unit files got deleted. Appreciate your posting here so I could confirm it was the same issue we were seeing. Can confirm the workaround seems to work on both intel and arm64 (and same issue):
gitlab-runner-helper-images does not replace gitlab-runner, so declaring Replaces: gitlab-runner (<< 17.7) is wrong! It does conflict with gitlab-runner version 17.6 (17.5 doesn’t contain those files), so a Conflicts: gitlab-runner (= 17.6) (I don’t remember the syntax, maybe it has to be different).
I expect what they could have done was put a depends to make the gitlab-runner-helper-image depend on gitlab-runner-17.7.0-1 to ensure that was installed first. This would seem to be true, since on my system when running apt-get upgrade I got an error message, but on the subsequent run, gitlab-runner-helper-images was installed, and the helper package got installed without problems. So I never had to use the force-overwrite parameters.
I read the Debian Policy manual years ago (I’ve used Debian since 1999, so it’s since then, but I can’t remember when) but it seems I forgot a major usecase (it’s even explicitly mentioned) for “Replaces”. Sorry for that.
And checking everything I wrote I found that 17.5 does contain those files (I checked on one of our runners, that has 17.5, but must have made a typo when not being able to see anything in /usr/lib/gitlab-runner. Looking on our mirror server, there have been files in /usr/lib/gitlab-runner (the amount of files have changed, haven’t done a full investigation into that) since gitlab-runner 11.1.