8000
Skip to content

Conversation

@ericonr
Copy link
Member
@ericonr ericonr commented Dec 5, 2020

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.

@hippi777
Copy link
hippi777 commented Dec 5, 2020

hi there! :)

i took a deeper look at it, and other than the remaining issue, it looks all good to me! :)

@Duncaen
Copy link
Member
Duncaen commented Dec 5, 2020

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.

@ericonr
Copy link
Member Author
ericonr commented Dec 5, 2020

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!

@ericonr ericonr force-pushed the reconf branch 2 times, most recently from 9ff8cf6 to 7363f37 Compare December 5, 2020 18:43
@ericonr
Copy link
Member Author
ericonr commented Dec 5, 2020

For now, I went with no shortopt.

I implemented your suggested changes.

EDIT: also fixed indentation.

@ericonr ericonr force-pushed the reconf branch 3 times, most recently from 2bfa2b5 to 966e66a Compare December 6, 2020 23:28
Also clean up macro in check.c.
@Duncaen Duncaen force-pushed the reconf branch 3 times, most recently from 40fb854 to 0554072 Compare June 3, 2025 21:50
ericonr and others added 3 commits June 3, 2025 23:57
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 <mail@duncano.de>
@Duncaen Duncaen merged commit 812bdf1 into void-linux:master Jun 3, 2025
6 checks passed
@ericonr ericonr deleted the reconf branch June 4, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xbps-pkgdb prints weird error message when checking a package

3 participants

0