puppetlabs / puppetlabs-release

Repo that builds packages to add our apt and yum repositories and public signing key.
7 stars 39 forks source link

Both Ubuntu Noble release packages unconditionally try to install the same preferences file #312

Closed jorhett closed 1 week ago

jorhett commented 3 weeks ago

Describe the Bug

Both release packages added in #310 unconditionally try to install the same preferences file:

Unpacking puppet-tools-release (1.0.0-17noble) ...
dpkg: error processing archive /tmp/puppet-tools-release-noble.deb (--unpack):
 trying to overwrite '/etc/apt/preferences.d/puppet-release.pref', which is also in package puppet-release 1.0.0-33noble
Errors were encountered while processing:
 /tmp/puppet-tools-release-noble.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Expected Behavior

You should be able to install both puppet-release and puppet-tools-release

Steps to Reproduce

$ wget https://apt.puppetlabs.com/puppet-tools-noble.deb $ apt install ./puppet-release-noble.deb

(works fine)

$ wget https://apt.puppetlabs.com/puppet-tools-release-noble.deb $ apt install ./puppet-tools-release-noble.deb Note, selecting 'puppet-tools-release' instead of './puppet-tools-release-noble.deb' The following NEW packages will be installed: puppet-tools-release 0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded. Need to get 0 B/11.5 kB of archives. After this operation, 10.2 kB of additional disk space will be used. Get:1 /tmp/puppet-tools-release-noble.deb puppet-tools-release all 1.0.0-17noble [11.5 kB] Selecting previously unselected package puppet-tools-release. (Reading database ... 221162 files and directories currently installed.) Preparing to unpack .../puppet-tools-release-noble.deb ... Unpacking puppet-tools-release (1.0.0-17noble) ... dpkg: error processing archive /tmp/puppet-tools-release-noble.deb (--unpack): trying to overwrite '/etc/apt/preferences.d/puppet-release.pref', which is also in package puppet-release 1.0.0-33noble Errors were encountered while processing: /tmp/puppet-tools-release-noble.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Environment

Additional Context

You might want to change the default platform prompt to name an OS that isn't multiple years EOL 😁

e-gris commented 2 weeks ago

I'm looking into this.

e-gris commented 1 week ago

Fixed by not including the pref file in puppet-tools-release

Because, after some consideration, we needed to add the .pref file in puppet*-release, I would not recommend apt for installing release packages, but dpkg instead. Once the release packages are installed, then using apt is fine.