GeezerVison is showing github.com — Support running only specific checks in xbps-pkgdb by ericonr · Pull Request #352 · void-linux/xbps
Conversation
ericonr
commented
Dec 5, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
WIP because I have no idea how to construct the array to pass to getsubopt...
Using the example in https://man.voidlinux.org/getsubopt.3 complains about discarded qualifiers in char *const available[], using the example in https://man.voidlinux.org/getsubopt.3p complains about the discarded qualifiers when passing const char *available[] to the function.
Since XBPS aims to build with -Werror, I need to find some way of satisfying the compiler.
This also closes #351 , if that's acceptable.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
hi there! :)
i took a deeper look at it, and other than the remaining issue, it looks all good to me! :)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I don't think -c is a good flag, this is already used in most other tools for --cachedir and I could see that we might want to add this flag to xbps-pkgdb in the future.
I think it would generally fit better into the codebase to use an integer/bitmasks:
enum checks {
CHECK_FILES = 1 << 1,
CHECK_DEPENDENCIES = 1 << 2,
CHECK_ALTERNATIVES = 1 << 3,
CHECK_PKGDB = 1 << 4,
};
I think it makes sense to merge symlinks and files into one category.
"unneeded" is something internal and I think it would make more sense to call it pkgdb checks,
so this could be extended in the future to have more pkgdb checks without having to add more
flags. "rundeps" is an internal name, there are no different types of user facing dependencies
in xbps itself so I think calling it "depends" or "dependencies" makes more sense.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
I don't think -c is a good flag, this is already used in most other tools for --cachedir and I could see that we might want to add this flag to xbps-pkgdb in the future.
Hmm, good point. Suggestions for flag name? I think it would be nice to have a shortopt option for it.
I think it would generally fit better into the codebase to use an integer/bitmasks:
Fair enough. It also simplifies initialization.
I think it makes sense to merge symlinks and files into one category.
"unneeded" is something internal and I think it would make more sense to call it pkgdb checks,
so this could be extended in the future to have more pkgdb checks without having to add more
flags. "rundeps" is an internal name, there are no different types of user facing dependencies
in xbps itself so I think calling it "depends" or "dependencies" makes more sense.
Indeed, the split may have been too granular. I will update it with your suggestions.
Thanks!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ericonr
commented
Dec 5, 2020
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
For now, I went with no shortopt.
I implemented your suggested changes.
EDIT: also fixed indentation.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Also clean up macro in check.c.
|
|
for ((p = strtok_r(s, ",", &saveptr)); p;
|
|
|
(p = strtok_r(NULL, ",", &saveptr))) {
|
|
|
// trim spaces
|
|
|
for (; *p == ' '; p++);
|
Check notice
Code scanning / CodeQL
For loop variable changed in body
Loop counters should not be modified in the body of the [loop](1).
Add the --checks option to xbps-pkgdb, which allows the user to select
which package checks should be run. It works for a single package as
well as with the --all option.
Co-authored-by: Duncaen Overbruck <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|