-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UnstatedIuse: check for unstated IUSE in "?" dependencies
Check for cases where a dependency uses conditional use dependency with unknown USE flag. PMS states: It is an error for an ebuild to use a conditional use dependency when that ebuild does not have the flag in IUSE_EFFECTIVE. Bug: https://bugs.gentoo.org/921841 Requested-by: Sam James <[email protected]> Signed-off-by: Arthur Zamarin <[email protected]>
- Loading branch information
Showing
8 changed files
with
37 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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: 2 additions & 2 deletions
4
testdata/data/repos/standalone/DependencyCheck/MissingUseDepDefault/fix.patch
This file contains 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
testdata/data/repos/standalone/DependencyCheck/UnstatedIuse/expected-verbose.json
This file contains 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,2 +1,3 @@ | ||
{"__class__": "UnstatedIuse", "category": "DependencyCheck", "package": "UnstatedIuse", "version": "0", "attr": "depend", "flags": ["used"], "profile": null, "num_profiles": null} | ||
{"__class__": "UnstatedIuse", "category": "DependencyCheck", "package": "UnstatedIuse", "version": "0", "attr": "rdepend", "flags": ["used"], "profile": "default/amd64", "num_profiles": null} | ||
{"__class__": "UnstatedIuse", "category": "DependencyCheck", "package": "UnstatedIuse", "version": "0", "attr": "rdepend", "flags": ["used"], "profile": "default/x86", "num_profiles": null} |
1 change: 1 addition & 0 deletions
1
testdata/data/repos/standalone/DependencyCheck/UnstatedIuse/expected.json
This file contains 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 +1,2 @@ | ||
{"__class__": "UnstatedIuse", "category": "DependencyCheck", "package": "UnstatedIuse", "version": "0", "attr": "depend", "flags": ["used"], "profile": null, "num_profiles": null} | ||
{"__class__": "UnstatedIuse", "category": "DependencyCheck", "package": "UnstatedIuse", "version": "0", "attr": "rdepend", "flags": ["used"], "profile": "default/amd64", "num_profiles": 2} |
This file contains 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
7 changes: 7 additions & 0 deletions
7
testdata/repos/standalone/DependencyCheck/MissingUseDepDefault/metadata.xml
This file contains 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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<use> | ||
<flag name="foo">stub</flag> | ||
</use> | ||
</pkgmetadata> |
3 changes: 3 additions & 0 deletions
3
testdata/repos/standalone/DependencyCheck/UnstatedIuse/UnstatedIuse-0.ebuild
This file contains 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,5 +1,8 @@ | ||
EAPI=7 | ||
|
||
DESCRIPTION="Ebuild with unstated IUSE in depsets" | ||
HOMEPAGE="https://github.com/pkgcore/pkgcheck" | ||
SLOT="0" | ||
LICENSE="BSD" | ||
RDEPEND="used? ( stub/stub1 )" | ||
DEPEND="stub/stub4[used?]" |
This file contains 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
f2d4e37
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.
@ferringb not sure if you want to/could check if pkgcore needs something here too
f2d4e37
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.
@thesamesam good call; if PMS mandates this, then the proper 'layer' is pkgcore. pkgcheck should just be a user of pkgcore (albeit an intrusively low level one).
Is you pinging me an indication you want me to try and do this pkgcore side, or is this something you'll poke at? Cause I'm fucking around w/ a k8s CSI atm ;)