Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402935 - emerge bad handle on --exclude with masked packages
Summary: emerge bad handle on --exclude with masked packages
Status: UNCONFIRMED
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: 2012-02-10 01:55 UTC by Phr33d0m
Modified: 2013-05-09 16:25 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phr33d0m 2012-02-10 01:55:22 UTC
Hello, if we have this:

# emerge -pv gtk-engines-quartz

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

Calculating dependencies... done!
[ebuild  N    *] x11-themes/gtk-engines-quartz-0.2  29 kB

Total: 1 package (1 new), Size of downloads: 29 kB

The following keyword changes are necessary to proceed:
#required by gtk-engines-quartz (argument)
=x11-themes/gtk-engines-quartz-0.2 **



And we issue the following:

# emerge gtk-engines-quartz --exclude gtk-engines-quartz

We get this:


Calculating dependencies... done!

!!! All ebuilds that could satisfy "gtk-engines-quartz" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-themes/gtk-engines-quartz-0.2::gentoo (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


------------------------------------

I'm unsure if this is the default expected behaviour, as I happened to find it quite a annoyng in situations like this:

# emerge $(eix -n --only-names gtk-engines-) --exclude gtk-engines-quartz

Thanks in advance.
Comment 1 Zac Medico gentoo-dev 2012-02-10 02:40:26 UTC
(In reply to comment #0)
> I'm unsure if this is the default expected behaviour

--exclude is only meant for temporary exclusion from the merge list. Neither --exclude nor package.mask will help you with an unsatisfied dependency, because those can only be solved by masking the package that pulled in the unsatisfied dependency (repeat as necessary until you reach root package).

Maybe a duplicate of bug 372569, or something to document in the handbook.
Comment 2 Zac Medico gentoo-dev 2012-02-10 02:50:53 UTC
(In reply to comment #0)
> I'm unsure if this is the default expected behaviour, as I happened to find it
> quite a annoyng in situations like this:
> 
> # emerge $(eix -n --only-names gtk-engines-) --exclude gtk-engines-quartz

Oh I didn't understand what you where trying to do. Please disregard comment #1.

Maybe you can just do something like this:

  emerge $(eix -n --only-names gtk-engines- | grep -v gtk-engines-quartz)
Comment 3 Phr33d0m 2012-02-10 11:34:41 UTC
Emerge would need to check against the excludes list twice, both before AND after dep calculation. Right now it only happens after, so that's why I get the mask error when I try to exclude the masked package. This is why I reported this, because I'm still unsure if this is an expected behaviour in emerge.

And answering to your suggestion, yes there are multiple ways of doing it:

As you said:
# emerge $(eix -n --only-names gtk-engines- | grep -v gtk-engines-quartz)

or:
emerge $(eix -n --only-names gtk-engines- -! quartz)

etc... But that's not emerge related solution. That's why I gave this example:
# emerge gtk-engines-quartz --exclude gtk-engines-quartz

Where an error appears.

Regards.
Comment 4 Zac Medico gentoo-dev 2012-02-10 18:02:04 UTC
(In reply to comment #3)
> Emerge would need to check against the excludes list twice, both before AND
> after dep calculation. Right now it only happens after, so that's why I get the
> mask error when I try to exclude the masked package. This is why I reported
> this, because I'm still unsure if this is an expected behaviour in emerge.

The behavior is expected. An atom given on the command line is a dependency much like any other, and --exclude is only intended to prevent packages from being built/installed, not to prevent dependencies (from the command line or any other source) from being satisfied.

Since grep -v seems like a perfectly reasonable solution for your use case, I think it would be a waste of code (unnecessary bloat) to create a special interaction between command line atoms and --exclude.