Description
At times, someone may have some special notices that may not be worthy of landing in the main scancode licenses dataset. These could be your own proprietary notices or some composite license that you like to have named as such or it could be some advanced fixes that you maintain locally and you do not want yet to upgrade to a newer develop version of scancode. Regardless of the why this is needed, it would be great to have an option to reference an extra, local directory of license texts and rules that would be included in the license detection perimeter.
This could simply take the form of a new command line option such as --extra-licenses
or --additional-licenses
that would point to a directory with the same structure as the license data set e.g with a licenses
and a rules
subdirectory and when using this option, these extra licenses would validated and loaded in the index the same way that the standard ones are.
Some internal caveats to consider is the license index creation and cache invalidation:
should there be a separate index built or not? and if so then a separate cache might be needed.
If a single index is used, then the cache (and its cache hash) should be built considering these extra licenses files (in addition to the actual scancode source code files and its license and rule files) which means that if you run scancode once without extra, an index cache is built.
If you run with --extra that cache would be invalidated and a new cache built considering the extra. And if you run scancode again without extra or with a different extra, the cache would be again invalidated and rebuilt. This is not a major issue but may come with small perf penalty when switching usage between with or without extra or using different extra.