Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 216947 - Lots of unused licenses in /usr/portage/licenses/
Summary: Lots of unused licenses in /usr/portage/licenses/
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 19:51 UTC by dolphinling
Modified: 2008-04-11 16:01 UTC (History)
0 users

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


Attachments
Script to find unused licenses (needs modification to run) (find_unused_licenses.pl,371 bytes, text/plain)
2008-04-11 15:46 UTC, dolphinling
Details
output of script (has false positives) (unused_licenses_overcounts,3.59 KB, text/plain)
2008-04-11 16:01 UTC, dolphinling
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dolphinling 2008-04-08 19:51:01 UTC
# 876 licenses in /usr/portage/licenses
ls /usr/portage/licenses/ | wc -l
876

# FEWER THAN 796 licenses actually used in ebuilds/eclasses
grep -rIoh "LICENSE=\".*\"" /usr/portage/* |sort -u | wc -l
796

There are at least 80 (though really more, since the grep has false positives) licenses in /usr/portage/licenses/ that aren't used in any ebuilds or eclasses. My guess is that (most? all?) of these should be removed.

Reproducible: Always
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2008-04-09 14:10:21 UTC
reopen with actual examples please.  otherwise, this is invalid.
Comment 2 dolphinling 2008-04-09 15:32:42 UTC
Working on a script to find exactly which are unused--however, just found out I have exactly no free time in the next couple weeks, so it might be a while.
Comment 3 dolphinling 2008-04-11 15:46:24 UTC
Created attachment 149411 [details]
Script to find unused licenses (needs modification to run)

Here's a script to find unused licenses. You need a list of used licenses, which can be gotten with 
grep -rIoh "LICENSE=\".*\"" /usr/portage/* |sort -u
as above.

You'll also need to edit line 3 of the script to point to that.
Comment 4 dolphinling 2008-04-11 16:01:23 UTC
Created attachment 149413 [details]
output of script (has false positives)

Output of script. This has false positives because of ebuilds that have their license programatically set* (e.g. all of modular X).

* ...which is really stupid in my opinion, think of the potential for false positives, but that's a topic for another bug.