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

Bug 300455

Summary: portage produces false warnings about circular license_groups
Product: Portage Development Reporter: Hanno Böck <hanno>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: licenses
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 335925    

Description Hanno Böck gentoo-dev 2010-01-10 15:27:43 UTC
When creating manifests, I sometimes get warnings like this:
hanno@laverne /mnt/data/cvs/gentoo-x86/sys-libs/libhx $ ebuild libhx-3.2.ebuild manifest
Appending /mnt/data/cvs/gentoo-x86 to PORTDIR_OVERLAY...
Circular license group reference detected in 'GPL-COMPATIBLE'
Circular license group reference detected in 'FSF-APPROVED'
Circular license group reference detected in 'OSI-APPROVED'
Circular license group reference detected in 'MISC-FREE'
Circular license group reference detected in 'FSF-APPROVED-OTHER'
Circular license group reference detected in 'FREE-SOFTWARE'
Circular license group reference detected in 'FREE-DOCUMENTS'
Circular license group reference detected in 'GPL-COMPATIBLE'
Circular license group reference detected in 'FSF-APPROVED'
Circular license group reference detected in 'OSI-APPROVED'
Circular license group reference detected in 'MISC-FREE'
Circular license group reference detected in 'FSF-APPROVED-OTHER'
Circular license group reference detected in 'FREE-SOFTWARE'
Circular license group reference detected in 'FREE-DOCUMENTS'
Circular license group reference detected in 'GPL-COMPATIBLE'
Circular license group reference detected in 'FSF-APPROVED'
Circular license group reference detected in 'OSI-APPROVED'
Circular license group reference detected in 'MISC-FREE'
Circular license group reference detected in 'FSF-APPROVED-OTHER'
Circular license group reference detected in 'FREE-SOFTWARE'
Circular license group reference detected in 'FREE-DOCUMENTS'
>>> Creating Manifest for /mnt/data/cvs/gentoo-x86/sys-libs/libhx

This is definitely wrong, e.g. GPL-COMPATIBLE or MISC-FREE contain no other sets, so they cannot be circular at all.
Comment 1 Ulrich Müller gentoo-dev 2010-01-22 06:49:54 UTC
I've seen this too, with "ebuild fetch" in portage-2.2_rc61.
Comment 2 Zac Medico gentoo-dev 2010-01-30 21:20:18 UTC
Mysteriously, I can't reproduce this one.
Comment 3 Zac Medico gentoo-dev 2010-01-31 21:15:50 UTC
(In reply to comment #0)
> Appending /mnt/data/cvs/gentoo-x86 to PORTDIR_OVERLAY...

I suspect that it might be related to the above message. The license_groups files from the overlays are stacked together with those from $PORTDIR, so it's possible that the combination of license_groups files is what triggers the warning. Maybe the files are just somewhat out of sync, and if you update one or both trees then it will go away.
Comment 4 Hanno Böck gentoo-dev 2010-02-02 13:07:10 UTC
Just saw it again and definitely checked that license_groups in my CVS checkout and my tree were up-to-date and in sync.
Comment 5 Ulrich Müller gentoo-dev 2010-09-20 16:38:54 UTC
(In reply to comment #3)
> > Appending /mnt/data/cvs/gentoo-x86 to PORTDIR_OVERLAY...
> 
> I suspect that it might be related to the above message. The license_groups
> files from the overlays are stacked together with those from $PORTDIR, so
> it's possible that the combination of license_groups files is what triggers
> the warning. Maybe the files are just somewhat out of sync, and if you
> update one or both trees then it will go away.

I see the false warnings even with identical license_groups files in both trees.

As far as I can see, the following happens (all in LicenseManager.py):
1. _read_license_groups reads the license groups from all locations.
   Therefore, every group is read *twice* (from PORTDIR and PORTDIR_OVERLAY).
2. When license groups are later expanded in function _expandLicenseToken,
   each group will be added to variable traversed_groups when it is first met.
3. When a group is met for the second time, the warning is triggered.
Comment 6 Sebastian Luther (few) 2010-09-20 17:31:10 UTC
Does anyone see a reason for not using a set instead of a list for the keys of LicenseManager._license_groups?
Comment 7 Zac Medico gentoo-dev 2010-09-21 09:16:19 UTC
(In reply to comment #5)
> 3. When a group is met for the second time, the warning is triggered.

That's true.

(In reply to comment #6)
> Does anyone see a reason for not using a set instead of a list for the keys of
> LicenseManager._license_groups?

Good idea. It's in git now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0e902edf1c3a0d4638da6f915b520471a403c2e6

Comment 8 Zac Medico gentoo-dev 2010-09-22 03:45:19 UTC
This is fixed in 2.1.9.10 and 2.2_rc86.