Open
Conversation
CarterLi
reviewed
Apr 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for counting NuTyX “cards” packages in the Packages module.
Changes:
- Introduces a new
cardspackage count in the shared packages result struct. - Adds a new disable-flag bit for
cardsand wires it into JSON config parsing/generation. - Implements Linux detection for
cardsby counting entries under/var/lib/pkg/DB.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/modules/packages/packages.c | Prints cards, supports disabling via JSON, and emits cards in JSON results. |
| src/modules/packages/option.h | Adds FF_PACKAGES_FLAG_CARDS_BIT to allow disabling cards counting. |
| src/detection/packages/packages_linux.c | Adds Linux-side counting logic for NuTyX cards (/var/lib/pkg/DB). |
| src/detection/packages/packages.h | Adds cards field to FFPackagesResult. |
Comment on lines
+64
to
66
| FF_PRINT_PACKAGE(cards) | ||
| FF_PRINT_PACKAGE(choco) | ||
| FF_PRINT_PACKAGE(dpkg) |
There was a problem hiding this comment.
cards was added to the default printed list/JSON result, but it isn’t exposed to the custom outputFormat path (missing FF_ARG(counts.cards, "cards") in the FF_PRINT_FORMAT_CHECKED argument list) and it’s also missing from ffPackagesModuleInfo.formatArgs. As a result, {cards} can’t be used in user-defined formats even though the manager is supported.
Author
|
Do I need to do anything? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adding support for card package manager counting packages.
Changes
Checklist