Comments (2)
As noted elsewhere, the obstacle here isn't the lack of pulling the data (that code already exists), but the way the validation works; the NetkanValidator
that runs on .netkan
files before they're inflated performs the license validation checks:
CKAN/Netkan/Validators/NetkanValidator.cs
Line 20 in 393544d
... which include making sure the license is defined:
CKAN/Netkan/Validators/LicensesValidator.cs
Lines 42 to 45 in 393544d
If the licenses validator was removed from the netkan validator (and added to the ckan validator), the existing transformers would populate missing licenses as-is:
CKAN/Netkan/Transformers/GithubTransformer.cs
Lines 145 to 150 in 393544d
CKAN/Netkan/Transformers/SpacedockTransformer.cs
Lines 100 to 122 in 393544d
Note that many or most of the licenses on SpaceDock are invalid and have to be massaged to get them to match the corresponding string in the CKAN schema. The most common issue is that SD uses a space where the schema uses a -
, which the SpaceDock
adder fixes here:
from ckan.
This is as far back as I was able to trace the licence-in-netkan requirement check; the very first commit creating metadata.t
almost 10 years ago:
And here's where pjf explained it:
Because our tests don't actually do any netkan inflation, the second can report a missing license when we'd inflate it just fine (eg: when the KerbalStuff license is a valid license string in our spec). In those cases, one can set
"x_netkan_license_ok" : true
to disable the check.
It sounds like they were getting a lot of user-composed netkans with license
set to an invalid string (and they couldn't validate after inflation, because at that time there wasn't any inflation), and those needed to get caught, and the field was made required as well as a side effect...? I guess because the check was just a dictionary look-up, with no explicit check for absent or null:
my $mod_license = $metadata->{license} // "(none)";
ok(
$metadata->{x_netkan_license_ok} || $licenses{$mod_license},
"$shortname license ($mod_license) should match spec. Set `x_netkan_license_ok` to supress."
);
}
Based on that, I think I can finally confidently say that there isn't a deeper reason for why this is required in the netkan, and it's safe to change it. 🎉
from ckan.
Related Issues (20)
- I can't uninstall Textures Unlimited [Bug]: HOT 7
- [Bug]: Repository update failed HOT 5
- [Bug]: New Version of Parallax requires an updated dependency, CKAN still wants the older version HOT 1
- [Bug]: Proton game instances on Linux HOT 2
- [Bug]: allow-incompatible CLI option is being ignored HOT 1
- [Bug]: Access to path 'G:/steamitself/steamapps/common/kerbal space program/CKAN' is denied. HOT 1
- [Bug]: cannot have both Windows and Linux game instances HOT 3
- [Bug]: Error installing NFLV: Cannot find central directory HOT 2
- [Feature]: alert the user when the repository is older than some threshold HOT 9
- [Feature]: CKAN can have an automatic translator for the introduction of the mods HOT 2
- RP-1 Express added a `v` version prefix in a conflict where KER doesn't use one HOT 2
- [Feature]: use parallel downloading HOT 5
- [Bug]: CKAN First time URLHandlersPrompt fails due to running as root protection HOT 3
- [Bug]: Reposotory update failed! HOT 1
- [Bug]: max game version column can show an incorrect value when a mod uses major.minor ksp_max_version HOT 6
- [Feature] .ckan files need a way to suppress recommendations (allows for accurate backups/replication)
- [Feature] Expose license metadata to search UI HOT 2
- [Feature] CmdLine: `compat` usability improvements HOT 3
- The screen to select a mod to satisfy a virtual dependency does not filter out mods that are conflicting with other dependencies of the changeset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckan.