-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Softwares/Gentoo.pm #1032
Open
anyqov
wants to merge
1
commit into
fusioninventory:develop
Choose a base branch
from
anyqov:patch-1
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
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.
Hi @anyqov
this is wrong, you better need to change
_equeryNeedsWildcard()
to returntrue
in your case as this what means the?
unary test: if_equeryNeedsWildcard()
istrue
useequery list -i '*'
as$command
, otherwise useequery list -i
.Your change just breaks compatibility for the case it returns
false
.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.
Thanks for the answer, @g-bougard.
Gentoo release 2.7, 5.15.25-gentoo-dist. Software detection doesn't work. I get:
equery -V:
equery (0.5.1-r1) - Gentoo package query tool
As I understand it, for equery version greater than 0.3 it should return true, but acts like false. What's wrong with _equeryNeedsWildcard()?
equery list -i
List installed packages matching the query pattern
!!! Default action for this module has changed in Gentoolkit 0.3.
!!! Use globbing to simulate the old behavior (see man equery).
!!! Use '' to check all installed packages.
!!! Use 'foo-bar/' to filter by category.
Usage: list [options] pkgspec
options
-h, --help display this help message
-d, --duplicates list only installed duplicate packages
-b, --binpkgs-missing list only installed packages without a corresponding
binary package
-f, --full-regex query is a regular expression
-m, --mask-reason include reason for package mask
-I, --exclude-installed exclude installed packages from output
-o, --overlay-tree list packages in overlays
-p, --portage-tree list packages in the main portage tree
-F, --format=TMPL specify a custom output format
TMPL a format template using (see man page):
$location, $mask, $mask2, $cp, $cpv, $category, $name, $version, $revision, $fullversion, $slot, $repo, $keywords
equery list -i '*'
acct-group/adm-0-r1
acct-group/audio-0-r1
acct-group/cdrom-0-r1
acct-group/cron-0
acct-group/crontab-0
...
In fusioninventory.log:
[Fri Oct 21 15:09:24 2022][debug] Running FusionInventory::Agent::Task::Inventory::Generic::Softwares
[Fri Oct 21 15:09:24 2022][debug] Running FusionInventory::Agent::Task::Inventory::Generic::Softwares::Gentoo
[Fri Oct 21 15:09:24 2022][debug2] executing equery list -i
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.
The regexp on l.58 should match on:
But it doesn't because of the
-r1
suffix.It should better be to accept anything after the third number: