Upgrading Foreman from 3.3 to 3.4 failed due to dpkg error for ruby-foreman-tasks

Upgrading to the lastest foreman 3.4 version will fail because the ruby-foreman-tasks package has a probem with overwriting the “ruby2_keywords-0.0.5.gem” file

Expected outcome:
Upgrade just works :smiley:

Foreman and Proxy versions:
Both now 3.4.0
Both before 3.3.0
Foreman and Proxy plugin versions:

Name Description Author Version
foreman_bootdisk Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure. Dominic Cleal 19.0.5
foreman_discovery MaaS Discovery Plugin engine for Foreman Aditi Puntambekar, alongoldboim, Alon Goldboim, amirfefer, Amit Karsale, Amit Upadhye, Amos Benari, Avi Sharvit, Bryan Kearney, bshuster, Daniel Lobato, Daniel Lobato Garcia, Daniel Lobato García, Danny Smit, David Davis, Djebran Lezzoum, Dominic Cleal, Dominik Matoulek, Eric D. Helms, Ewoud Kohl van Wijngaarden, Frank Wall, Greg Sutcliffe, ChairmanTubeAmp, Ido Kanner, imriz, Imri Zvik, Ivan Nečas, Jan Matusz, John Mazzie, Joseph Mitchell Magen, June Zhang, kgaikwad, Lars Berntzon, ldjebran, Leos Stejskal, Lukas Zapletal, Lukáš Zapletal, Marek Hulan, Marek Hulán, MariaAga, Martin Bačovský, Matt Jarvis, Michael Moll, Nick, odovzhenko, Ohad Levy, Ondrej Prazak, Ondřej Ezr, Ori Rabin, orrabin, Partha Aji, Petr Chalupa, Phirince Philip, Rahul Bajaj, Robert Antoni Buj Gelonch, Ron Lavi, Scubafloyd, Sean O’Keeffe, Sebastian Gräßl, Shimon Shtein, Shlomi Zadok, Stephen Benjamin, Swapnil Abnave, Thomas Gelf, Timo Goebel, Tomas Strych, Tom Caspy, Tomer Brisker, and Yann Cézard 21.0.1
foreman_hooks Plugin engine for Foreman that enables running custom hook scripts on Foreman events Dominic Cleal 0.3.17
foreman_puppet Allow assigning Puppet environments and classes to the Foreman Hosts. Ondřej Ezr and Shira Maximov 4.0.1
foreman_setup Plugin for Foreman that helps set up provisioning. Dominic Cleal 8.0.1
foreman_templates Engine to synchronise provisioning templates from GitHub Greg Sutcliffe 9.3.0

Distribution and version:
Debian 11 - Bullseye

Other relevant data:
Here is the Output when I try to execute apt-get install ruby-foreman-tasks
The installer throws the same error

Unpacking ruby-foreman-tasks (7.0.0-1) …
dpkg: error processing archive /var/cache/apt/archives/ruby-foreman-tasks_7.0.0-1_all.deb (–unpack):
trying to overwrite ‘/usr/share/foreman/vendor/cache/ruby2_keywords-0.0.5.gem’, which is also in package foreman 3.4.0-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
needrestart is being skipped since dpkg has failed

Hi all,

I temporarily fixed the upgrade by manually downloading the ruby-foreman-tasks_7.0.0-1_all.deb and installed it with dpkg --force-overwrite --install ./ruby-foreman-tasks_7.0.0-1_all.deb

The ruby2_keywords-0.0.5.gem is 100% the same file after the force-overwrite so I dont think this will have any negative impact on the installation.

Has somebody experienced the same issue?

Thanks for the help!

Not me personally, but there’s this Bug #35543: Unable to install ruby-foreman-tasks during foreman upgrade to 3.4 - Packaging - Foreman

1 Like

Perfect, thanks for that! This is exactly what I was looking for.