-
Notifications
You must be signed in to change notification settings - Fork 32
ProfilesCheck: make.defaults checks #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
826c474
ProfilesCheck: check for unknown ARCH in make.defaults
arthurzam 9e43d72
ProfilesCheck: check for unknown USE & IUSE_IMPLICIT in make.defaults
arthurzam 75664ae
ProfilesCheck: check for unknown USE_EXPAND_* in make.defaults
arthurzam bca5e48
ProfilesCheck: check USE_EXPAND_VALUES_* in make.defaults
arthurzam 191300b
ProfilesCheck: check missing values for implicit in make.defaults
arthurzam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...data/data/repos/profiledir/ProfilesCheck/ProfileMissingImplicitExpandValues/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"__class__": "ProfileMissingImplicitExpandValues", "path": "unknown_use/make.defaults", "groups": ["ELIBC"]} |
12 changes: 12 additions & 0 deletions
12
testdata/data/repos/profiledir/ProfilesCheck/ProfileMissingImplicitExpandValues/fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| diff -Naur profiledir/profiles/unknown_use/make.defaults fixed/profiles/unknown_use/make.defaults | ||
| diff --git a/testdata/repos/profiledir/profiles/unknown_use/make.defaults b/testdata/repos/profiledir/profiles/unknown_use/make.defaults | ||
| --- profiledir/profiles/unknown_use/make.defaults | ||
| +++ fixed/profiles/unknown_use/make.defaults | ||
| @@ -4,6 +4,7 @@ | ||
| USE_EXPAND="PYTHON_TARGETS PYTHON_SINGLE_TARGET" | ||
| USE_EXPAND_UNPREFIXED="ARCH LUA_TARGETS PYTHON_TARGETS" | ||
| USE_EXPAND_VALUES_ARCH="amd64 x86" | ||
| +USE_EXPAND_VALUES_ELIBC="GNU" | ||
| USE_EXPAND_VALUES_LUA_TARGETS="lua5_1" | ||
| USE_EXPAND_VALUES_PYTHON_TARGETS="python3_9 python3_10" | ||
| PYTHON_TARGETS="python3_9 python3_10" |
1 change: 1 addition & 0 deletions
1
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"__class__": "UnknownProfileArch", "path": "unknown_arch/make.defaults", "arch": "unknown"} |
6 changes: 6 additions & 0 deletions
6
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileArch/fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| diff -Naur profiledir/profiles/unknown_arch/make.defaults fixed/profiles/unknown_arch/make.defaults | ||
| --- profiledir/profiles/unknown_arch/make.defaults 2019-11-12 20:35:43.195830784 -0700 | ||
| +++ fixed/profiles/unknown_arch/make.defaults 2019-11-12 20:45:16.582848028 -0700 | ||
| @@ -1 +1 @@ | ||
| -ARCH="unknown" | ||
| +ARCH="amd64" |
1 change: 1 addition & 0 deletions
1
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUse/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUse/fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| diff -Naur profiledir/profiles/use.desc fixed/profiles/use.desc | ||
| --- profiledir/profiles/use.desc 2020-11-23 10:54:01.018477444 -0700 | ||
| +++ fixed/profiles/use.desc 2020-11-23 11:54:08.071178614 -0700 | ||
| @@ -1 +1,5 @@ | ||
| @@ -1 +1,7 @@ | ||
| used - used global flag | ||
| +use_force - use.force | ||
| +use_mask - use.mask | ||
| +use_stable_force - use.stable.force | ||
| +use_stable_mask - use.stable.mask | ||
| +defaults_use - make.defaults USE | ||
| +defaults_iuse_implicit - make.defaults IUSE_IMPLICIT |
3 changes: 3 additions & 0 deletions
3
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUseExpand/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| {"__class__": "UnknownProfileUseExpand", "path": "unknown_use/make.defaults", "var": "USE_EXPAND", "groups": ["PYTHON_SINGLE_TARGET"]} | ||
| {"__class__": "UnknownProfileUseExpand", "path": "unknown_use/make.defaults", "var": "USE_EXPAND_UNPREFIXED", "groups": ["LUA_TARGETS"]} | ||
| {"__class__": "UnknownProfileUseExpand", "path": "unknown_use/make.defaults", "var": "USE_EXPAND_VALUES_LUA_TARGETS", "groups": ["LUA_TARGETS"]} |
26 changes: 26 additions & 0 deletions
26
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUseExpand/fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff -Naur profiledir/profiles/desc/python_single_target.desc fixed/profiles/desc/python_single_target.desc | ||
| new file mode 100644 | ||
| index 00000000..dcf7e163 | ||
| --- /dev/null | ||
| +++ fixed/profiles/desc/python_single_target.desc | ||
| @@ -0,0 +1,3 @@ | ||
| +python3_10 - Build for Python 3.10 only | ||
| +python3_11 - Build for Python 3.11 only | ||
| + | ||
| diff -Naur profiledir/profiles/unknown_use/make.defaults fixed/profiles/unknown_use/make.defaults | ||
| diff --git a/testdata/repos/profiledir/profiles/unknown_use/make.defaults b/testdata/repos/profiledir/profiles/unknown_use/make.defaults | ||
| index 6d789215..2c98efd3 100644 | ||
| --- profiledir/profiles/unknown_use/make.defaults | ||
| +++ fixed/profiles/unknown_use/make.defaults | ||
| @@ -1,9 +1,8 @@ | ||
| USE="defaults_use used" | ||
| IUSE_IMPLICIT="defaults_iuse_implicit used" | ||
| USE_EXPAND_IMPLICIT="ARCH ELIBC" | ||
| -USE_EXPAND="PYTHON_TARGETS PYTHON_SINGLE_TARGET" | ||
| -USE_EXPAND_UNPREFIXED="ARCH LUA_TARGETS PYTHON_TARGETS" | ||
| +USE_EXPAND="PYTHON_TARGETS" | ||
| +USE_EXPAND_UNPREFIXED="ARCH PYTHON_TARGETS" | ||
| USE_EXPAND_VALUES_ARCH="amd64 x86" | ||
| -USE_EXPAND_VALUES_LUA_TARGETS="lua5_1" | ||
| USE_EXPAND_VALUES_PYTHON_TARGETS="python3_9 python3_10" | ||
| PYTHON_TARGETS="python3_9 python3_10" |
2 changes: 2 additions & 0 deletions
2
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUseExpandValue/expected.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| {"__class__": "UnknownProfileUseExpandValue", "path": "unknown_use/make.defaults", "group": "PYTHON_TARGETS", "values": ["python3_9"]} | ||
| {"__class__": "UnknownProfileUseExpandValue", "path": "unknown_use/make.defaults", "group": "USE_EXPAND_VALUES_PYTHON_TARGETS", "values": ["python3_9"]} |
13 changes: 13 additions & 0 deletions
13
testdata/data/repos/profiledir/ProfilesCheck/UnknownProfileUseExpandValue/fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff -Naur profiledir/profiles/unknown_use/make.defaults fixed/profiles/unknown_use/make.defaults | ||
| diff --git a/testdata/repos/profiledir/profiles/unknown_use/make.defaults b/testdata/repos/profiledir/profiles/unknown_use/make.defaults | ||
| index 6d789215..2c98efd3 100644 | ||
| --- profiledir/profiles/unknown_use/make.defaults | ||
| +++ fixed/profiles/unknown_use/make.defaults | ||
| @@ -5,5 +5,5 @@ | ||
| USE_EXPAND_UNPREFIXED="ARCH LUA_TARGETS PYTHON_TARGETS" | ||
| USE_EXPAND_VALUES_ARCH="amd64 x86" | ||
| USE_EXPAND_VALUES_LUA_TARGETS="lua5_1" | ||
| -USE_EXPAND_VALUES_PYTHON_TARGETS="python3_9 python3_10" | ||
| -PYTHON_TARGETS="python3_9 python3_10" | ||
| +USE_EXPAND_VALUES_PYTHON_TARGETS="python3_10" | ||
| +PYTHON_TARGETS="python3_10" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| python3_10 - Build with Python 3.10 | ||
| python3_11 - Build with Python 3.11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ARCH="unknown" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| USE="defaults_use used" | ||
| IUSE_IMPLICIT="defaults_iuse_implicit used" | ||
| USE_EXPAND_IMPLICIT="ARCH ELIBC" | ||
| USE_EXPAND="PYTHON_TARGETS PYTHON_SINGLE_TARGET" | ||
| USE_EXPAND_UNPREFIXED="ARCH LUA_TARGETS PYTHON_TARGETS" | ||
| USE_EXPAND_VALUES_ARCH="amd64 x86" | ||
| USE_EXPAND_VALUES_LUA_TARGETS="lua5_1" | ||
| USE_EXPAND_VALUES_PYTHON_TARGETS="python3_9 python3_10" | ||
| PYTHON_TARGETS="python3_9 python3_10" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any thoughts on moving the concept of use_expand groups into pkgcore itself? We've got multiple spots that are now hardcoding how to split them. Seems like something where an object representation might be of value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will create a shared impl in pkgcore, but for now I don't won't to be blocked until pkgcore release, so for now duplication of code, until I introduce the new shared code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. My comment is more an observation I did something similar in portage_conf for use_expand, so it's probably time one of us cuts a class to hold the rules for it. ;)