Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280716 - DEPEND="!atom" uninstalls the blocker after a merge instead of before
Summary: DEPEND="!atom" uninstalls the blocker after a merge instead of before
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-08 05:24 UTC by ferret
Modified: 2009-08-08 19:40 UTC (History)
1 user (show)

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


Attachments
test ebuild I used to create the pasted output (stupidtest-0.ebuild,254 bytes, text/plain)
2009-08-08 05:25 UTC, ferret
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ferret 2009-08-08 05:24:20 UTC
I have this in one of my ebuilds:

RDEPEND="....
..."

DEPEND="${RDEPEND}
!x11-misc/imake"

You will note the !atom is in DEPEND, which is compile time.  It is there because I need imake to NOT be on the system when this package is being emerged.

However, this is the result of trying to emerge a minimal test case of this:

$ sudo emerge -av1 stupidtest

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] app-misc/stupidtest-0  0 kB [1]
[uninstall    ] x11-misc/imake-1.0.2  USE="lib32 -debug"  [2]
[blocks b     ] x11-misc/imake ("x11-misc/imake" is blocking app-misc/stupidtest-0)

Total: 1 package (1 new, 1 uninstall), Size of downloads: 0 kB
Conflict: 1 block
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage/junk
 [2] /usr/local/portage/multilib

Would you like to merge these packages? [Yes/No] 



As you can see, it doesn't uninstall it until *AFTER* my package has emerged, which is no good at all!  This behaviour would make sense if the atom was in RDEPEND, but it is not.

I have tested this also with portage-2.2_rc36
Comment 1 ferret 2009-08-08 05:25:51 UTC
Created attachment 200554 [details]
test ebuild I used to create the pasted output
Comment 2 Ciaran McCreesh 2009-08-08 16:06:50 UTC
Unfortunately, Portage is behaving as PMS says it should here (because PMS had to be rewritten to match Portage's behaviour...). DEPEND="!foo" means "if I'm being built from source, foo has to be removed at some point", and RDEPEND="!foo" means "foo has to be removed at some point". Use EAPI 2 hard blockers to get what you're after instead.

Yes, it's highly dumb.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-08 19:38:04 UTC
This is intended behavior.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-08 19:40:09 UTC
As comment #2 says, you can use DEPEND="!!atom" and EAPI="2" to achieve what you suggest.