bin/xbps-uhelper: allow multiple arguments for many actions#536
Merged
Duncaen merged 2 commits intovoid-linux:masterfrom Feb 10, 2023
Merged
bin/xbps-uhelper: allow multiple arguments for many actions#536Duncaen merged 2 commits intovoid-linux:masterfrom
Duncaen merged 2 commits intovoid-linux:masterfrom
Conversation
20a9977 to
9b1b90c
Compare
Member
|
Useful! |
9b1b90c to
aee22b4
Compare
these actions are kind of "meta" actions, combining getpkgdepname and
getpkgname (and the respective version actions) so that a list of mixed
pkgvers and package patterns can be interpreted. This uses the internal
format check of `xbps_pkgpattern_{name,version}()` to allow for a
fallback to `xbps_pkg_{name,version}()` for exact versions, then falls
back to displaying an error message if that also fails.
aee22b4 to
9938759
Compare
Member
Author
would this be helpful for any xtools? I see |
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.
Only implemented where it makes sense to, i.e., not
cmpver,pkgmatch,arch,getsystemdir,digest, andfetch.Tests show a large speed-up is possible when processing a large number of inputs (1718 in this case):
Before
After
(note the lack of
-n1in the second one)These actions are kind of "meta" actions, combining getpkgdepname and getpkgname (and the respective version actions) so that a list of mixed pkgvers and package patterns can be interpreted. This uses the internal format check of
xbps_pkgpattern_{name,version}()to allow for a fallback toxbps_pkg_{name,version}()for exact versions, then falls back to displaying an error message if that also fails.this will also be somewhat intertwined with an
xbps-uhelpermanpage, like in #533