# 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
reopen with actual examples please. otherwise, this is invalid.
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.
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.
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.