xbps-uhelper: add verbose output for cmpver/pkgmatch#549
Merged
Duncaen merged 1 commit intovoid-linux:masterfrom Jun 1, 2023
Merged
xbps-uhelper: add verbose output for cmpver/pkgmatch#549Duncaen merged 1 commit intovoid-linux:masterfrom
Duncaen merged 1 commit intovoid-linux:masterfrom
Conversation
Member
|
useful! |
Chocimier
approved these changes
Apr 12, 2023
Member
Chocimier
left a comment
There was a problem hiding this comment.
Nice, can you add completion too?
diff --git a/data/_xbps b/data/_xbps
index 31587571..6b5e3153 100644
--- a/data/_xbps
+++ b/data/_xbps
@@ -232,6 +232,7 @@ _xbps_uhelper() {
{-C,--config=-}'[Full path to configuration file]:config file:_files' \
{-d,--debug}'[Debug mode shown to stderr]' \
{-r,--rootdir=-}'[Full path to rootdir]:root dir:_files -/' \
+ {-v,--verbose}'[Verbose messages]' \
{-V,--version}'[Show XBPS version]' \
'1:action:->actions' \
'*:: :->args' && ret=0
9ef4389 to
b0768e2
Compare
Member
Author
ope forgot that, done (in a better way i think) |
Member
Author
|
I've fixed that CI failure in f117b1f |
Member
|
What about printing this to stderr instead of stdout? |
Member
Author
|
yes good idea |
38facaf to
43e5a7f
Compare
I can never remember which retval means which thing. This only prints if -v/--verbose is specified. Examples: ``` $ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 1 2 ; echo ret: $? 1 < 2 ret: 255 $ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 1 1 ; echo ret: $? 1 = 1 ret: 0 $ ./bin/xbps-uhelper/xbps-uhelper -v cmpver 2 1 ; echo ret: $? 2 > 1 ret: 1 $ ./bin/xbps-uhelper/xbps-uhelper -v pkgmatch 'foo-1.0_1' 'foo>=0' ; echo ret: $? foo-1.0_1 matches foo>=0 ret: 1 $ ./bin/xbps-uhelper/xbps-uhelper -v pkgmatch 'foo-1.0_1' 'foo<0.1_1' ; echo ret: $? foo-1.0_1 does not match foo<0.1_1 ret: 0 ``` it also seems that getting an error from pkgmatch is currently impossible
43e5a7f to
d7d76ae
Compare
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.
I can never remember which retval means which thing. This only prints if
-v/--verboseis specified.Examples:
it also seems that getting an error from pkgmatch is currently impossible