Ticket #1307 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

"cave import" does not allow same version installed in multiple slots

Reported by: cjm Owned by:
Priority: MinorRelease Milestone:
Component: clients/cave Version: 1.4.2
Keywords: import Cc:
Blocked By: Blocking:
Distribution: N/A


It appears that "cave import" allows different versions of the same package to be installed in different slots at the same time. But you can't install the same version of the same package into two different slots at the same time. Attempting to do that causes the first slot to be uninstalled.

I want to do this because I'm trying to use "cave import" to manage locally-installed Perl modules. I want to have multiple versions of Perl installed using a slot for each version. Perl XS modules must be compiled for a specific version of Perl, so it's common to have the same module version installed for each version of Perl.

To reproduce this:

mkdir -p /tmp/slot{1,2}/usr/src
touch /tmp/slot1/usr/src/test1 /tmp/slot2/usr/src/test2
cave import -x -r1 --location /tmp/slot1 testing/import 1.0 1
cave import -x -r1 --location /tmp/slot2 testing/import 1.1 2
ls -l /usr/src/test*

You'll see that both test1 and test2 are installed. But if you then do:

cave import -x -r1 --location /tmp/slot1 testing/import 1.1 1
ls -l /usr/src/test*

You'll see that test2 got uninstalled, because testing/import-1.1:1 replaces testing/import-1.1:2. I believe that's incorrect; slots should be independent of each other.

Change History

comment:1 Changed 4 years ago by cjm

I've found that a workaround is to use revision numbers on the versions:

cave import -x -r1 --location /tmp/slot1 testing/import 1.1-r1 1
cave import -x -r1 --location /tmp/slot2 testing/import 1.1-r2 2

works as expected. It doesn't really matter what the revision numbers are as long as they're different.

comment:2 Changed 4 years ago by ciaranm

  • Status changed from new to closed
  • Resolution set to wontfix

This is intentional, and it's down to how Gentoo handles installed packages. We can't allow this to work in general without breaking Portage, and I'm not sure that allowing it only for imported packages is a sensible idea...

Note: See TracTickets for help on using tickets.