GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support running only specific checks in xbps-pkgdb by ericonr · Pull Request #352 · void-linux/xbps

Conversation

@ericonr

@ericonr ericonr commented Dec 5, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@hippi777

hippi777 commented Dec 5, 2020

Copy link
Copy Markdown

hi there! :)

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Duncaen

Duncaen commented Dec 5, 2020

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericonr

ericonr commented Dec 5, 2020

Copy link
Copy Markdown
Member Author

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

ericonr commented Dec 5, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

For now, I went with no shortopt.

I implemented your suggested changes.

EDIT: also fixed indentation.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericonr
ericonr force-pushed the reconf branch 3 times, most recently from 2bfa2b5 to 966e66a Compare December 6, 2020 23:28
@ericonr @Duncaen
xbps-pkgdb: remove strerror message.
52c1852
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
github-advanced-security[bot]
github-advanced-security AI found potential problems Jun 3, 2025
View reviewed changes
Comment thread bin/xbps-pkgdb/main.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).
@Duncaen
Duncaen force-pushed the reconf branch from 0554072 to 7ef229f Compare June 3, 2025 21:53
ericonr and others added 3 commits June 3, 2025 23:57
@ericonr @Duncaen
xbps-pkgdb: add check selection.
50ab8f4
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]>
@ericonr @Duncaen
xbps-pkgdb.1: add --checks.
5b5358c
@Duncaen
NEWS: add xbps-pkgdb --checks
717b21f
@Duncaen
Duncaen force-pushed the reconf branch from 7ef229f to 717b21f Compare June 3, 2025 21:57
@Duncaen
Duncaen merged commit 812bdf1 into void-linux:master Jun 3, 2025
@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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

xbps-pkgdb prints weird error message when checking a package

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ericonr @hippi777 @Duncaen @github-advanced-security
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.