Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 288083

Summary: Warn/report license-based masking
Product: Portage Development Reporter: Luke-Jr <luke-jr+gentoobugs>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: caster, dominik.geyer, esigra, jklawiter, szyszko, wolf31o2
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=686344
https://github.com/pkgcore/pkgcheck/issues/471
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 164457    
Bug Blocks: 155723    

Description Luke-Jr 2009-10-07 17:58:39 UTC
Most of my systems were being held back to GCC 4.1 due to LICENSE changes for GCC 4.3. This new LICENSE caused it to be masked by my ACCEPT_LICENSES variable. It would be nice to be informed when ACCEPT_LICENSE is holding back an upgrade that is otherwise available.
Comment 1 Zac Medico gentoo-dev 2009-10-08 05:22:15 UTC
Until this is fixed I'd suggest periodically running something like this:

  ACCEPT_LICENSE="*" emerge -puD world
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2009-11-12 19:01:52 UTC
I'd like to add an example I ran into (using Portage 2.2_rc49 currently), regarding license masks and virtuals:


Calculating dependencies  ........... done!

!!! All ebuilds that could satisfy "dev-java/icedtea6-bin" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-java/icedtea6-bin-1.6.1 (masked by: ~x86 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
(dependency required by "virtual/jdk-1.6.0" [installed])
(dependency required by "dev-java/tomcat-servlet-api-5.5.27-r1" [installed])
(dependency required by "dev-util/eclipse-sdk-3.4-r2" [installed])
(dependency required by "@world" [argument])


Uh, what the heck, no further information. For whatever unknown reason the installed sun-jdk doesn't suffice. Only after adding dev-java/icedtea6-bin-1.6.1 to package.provided I got the following message:


!!! The following installed packages are masked:
- dev-java/sun-jdk-1.6.0.17 (masked by: dlj-1.1 license(s))
A copy of the 'dlj-1.1' license is located at '/usr/portage/licenses/dlj-1.1'.


This is fine, running unstable Portage, but stable Portage users will need a hint how to do that, when facing this feature - and better a notice beforehand updating to Portage 2.2.
Comment 3 Zac Medico gentoo-dev 2009-11-12 22:41:29 UTC
(In reply to comment #2)
This sun-jdk think has been driving lots of people crazy (also see bug 292752 and bug 292426). I'm going to do something about this for the next release.
Comment 4 Zac Medico gentoo-dev 2009-11-15 23:42:38 UTC
In svn r14822 it's fixed to always warn about installed packages masked by license. For updates masked by license, it warns if --complete-graph or --deep is given, since otherwise it is likely a waste of time.
Comment 5 Zac Medico gentoo-dev 2009-11-15 23:43:09 UTC
*** Bug 292752 has been marked as a duplicate of this bug. ***
Comment 6 Zac Medico gentoo-dev 2009-11-15 23:44:50 UTC
*** Bug 292426 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2009-11-16 01:18:06 UTC
This is fixed in portage-2.1.7.5 and 2.2_rc50.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-17 19:13:15 UTC
*** Bug 292502 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Klawiter 2010-01-26 15:52:14 UTC
I've just upgfraded portage to (stable) 2.1.7.16 and than got:

[ebuild     U ] dev-python/pywebkitgtk-1.1.7 [1.1.6-r1] 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

!!! The following installed packages are masked:
- dev-java/sun-jdk-1.6.0.17 (masked by: dlj-1.1 license(s))
A copy of the 'dlj-1.1' license is located at '/usr/portage/licenses/dlj-1.1'.

is it the same bug, or maybe just feature? ;-)
Comment 10 Zac Medico gentoo-dev 2010-01-26 20:48:21 UTC
(In reply to comment #9)
> !!! The following installed packages are masked:
> - dev-java/sun-jdk-1.6.0.17 (masked by: dlj-1.1 license(s))
> A copy of the 'dlj-1.1' license is located at '/usr/portage/licenses/dlj-1.1'.
> 
> is it the same bug, or maybe just feature? ;-)

That's the "fix" for this bug. Upon seeing that a message like that, the appropriate course of action is usually to add the mentioned license(s) to ACCEPT_LICENSE in /etc/make.conf. Like this:

  ACCEPT_LICENSE="dlj-1.1"
Comment 11 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-01-26 22:48:55 UTC
The current implementation doesn't work so well when there are multiple alternative deps, all masked either by license or by missing keyword or nonexistent package. If all alternatives fail, portage will report the reason only for the first alternative listed. If it's a missing package or package not keyworded for that arch, the user can't do anything about it and won't know that there is another alternative, just masked by license.

Example (stripped down): virtual/jdk-1.6.0
RDEPEND="|| (
                dev-java/icedtea6-bin
                =dev-java/sun-jdk-1.6.0*
                =dev-java/ibm-jdk-bin-1.6.0*
        )"

sun-jdk and ibm-jdk-bin have EULA licenses, icedtea6-bin and sun-jdk have only amd64 and x86 keyword, ibm-jdk-bin has (among other) ppc. A ppc user who doesn't have ibm-jdk-bin's license accepted, will get this:

!!! All ebuilds that could satisfy "dev-java/icedtea6-bin" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-java/icedtea6-bin-1.6.2-r2 (masked by: missing keyword)
- dev-java/icedtea6-bin-1.6.2-r1 (masked by: missing keyword)
- dev-java/icedtea6-bin-1.6.2 (masked by: missing keyword)

(dependency required by "virtual/jdk-1.6.0" [installed])
(dependency required by "net-dns/libidn-1.15" [installed])
(dependency required by "net-misc/whois-4.7.36" [installed])
(dependency required by "world" [argument])

Example is from bug 287615, another in bug 302032.
I've updated the jdk ebuild to workaround this (made icedtea6-bin and sun-jdk-bin deps apply only for x86/amd64), but maybe it could be fixed in general?
Comment 12 Anton Bolshakov 2010-01-27 00:34:25 UTC
(In reply to comment #10)
> the
> appropriate course of action is usually to add the mentioned license(s) to
> ACCEPT_LICENSE in /etc/make.conf. Like this:
> 
>   ACCEPT_LICENSE="dlj-1.1"
> 

Why not to add that recommendation to the error message?
Comment 13 Luke-Jr 2010-01-27 02:09:28 UTC
Obviously, if one were going to accept every license they encounter, they wouldn't be using ACCEPT_LICENSE in the first place. The whole point of using it is to avoid packages getting installed with disagreeable licenses...
Comment 14 Zac Medico gentoo-dev 2010-01-30 10:26:26 UTC
(In reply to comment #11)
To solve that, I think we need something like bug 164457.