Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583234 - negative dependencies control problem, e. g. with gcc[-multislot]
Summary: negative dependencies control problem, e. g. with gcc[-multislot]
Status: RESOLVED DUPLICATE of bug 582504
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-16 20:05 UTC by Rostislav Devyatov
Modified: 2016-05-21 14:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of emerge --info 'sys-devel/gcc:4.9.3' (file_583234.txt,6.31 KB, text/plain)
2016-05-16 20:05 UTC, Rostislav Devyatov
Details
Output of emerge -pqv 'sys-devel/gcc:4.9.3' (file_583234.txt,707 bytes, text/plain)
2016-05-16 20:07 UTC, Rostislav Devyatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rostislav Devyatov 2016-05-16 20:05:55 UTC
Created attachment 434470 [details]
Output of emerge --info 'sys-devel/gcc:4.9.3'

gcc-4.9.3 has the following "negative dependency":
!multislot? ( !<${CATEGORY}/gcc-4.9 )
which means that if gcc-4.9.3 is installed with -multislot (as it is by default), earlier versions of gcc should not be installed on the same machine. However, actually, when I have gcc-4.9.3[-multislot] already installed, and I try
~ # emerge -av sys-devel/gcc:4.7.4
I get no errors, and gcc-config -l gives me a correct list. So, portage allows me to install two packages that should not be installed on the same system (according to ebuilds). Only later, if I try to re-emerge gcc-4.9.3, I get an error message saying that it conflicts with gcc-4.7.4. This behaviour does not look correct for me.

I think the problem might be broader, for example, suppose I have two packages, A and B. A has DEPEND="!B", B has no dependencies. Then if I first install A, then B, I believe I will not gen any error messages.

Reproducible: always

Steps to reproduce: 
1. Get a system with gcc-4.9.3 WITHOUT multislot USE flag (or, to be sure, rebuild gcc-4.9.3 to make sure that the current version of ebuild was taken into account).
2. Install gcc-4.7.4 by saying
emerge -av sys-devel/gcc:4.7.4
3. Try to rebuild gcc-4.9.3

Expected results: error at step 2
Actual results: error at step 3
Comment 1 Rostislav Devyatov 2016-05-16 20:07:09 UTC
Created attachment 434476 [details]
Output of emerge -pqv 'sys-devel/gcc:4.9.3'
Comment 2 Zac Medico gentoo-dev 2016-05-17 00:00:57 UTC
(In reply to Rostislav Devyatov from comment #0)
> I think the problem might be broader, for example, suppose I have two
> packages, A and B. A has DEPEND="!B", B has no dependencies. Then if I first
> install A, then B, I believe I will not gen any error messages.

I think some of the confusion is related to the "!multislot? ( !<sys-devel/gcc-4.9 )" blocker being in DEPEND rather then RDEPEND. This causes the blocker to have no effect unless you are trying to build a version of gcc with this blocker in DEPEND (since DEPEND only matters at build time).

@toolchain: Can we get some clarification on the meaning of this blocker? Perhaps it should go in RDEPEND?
Comment 3 SpanKY gentoo-dev 2016-05-17 05:08:38 UTC
portage is WAI -- the gcc blocker is only listed in DEPEND

*** This bug has been marked as a duplicate of bug 582504 ***
Comment 4 Rostislav Devyatov 2016-05-21 11:15:37 UTC
Excuse me, could you please explain what is WAI? I could not find anything in Gentoo development guide.
Comment 5 SpanKY gentoo-dev 2016-05-21 14:55:38 UTC
(In reply to Rostislav Devyatov from comment #4)

Working As Intended