[Rpm-maint] [rpm-software-management/rpm] rpm --query --package` silently fails for non-existing files containing tilde (Issue #2069)
Michal Domonkos
notifications at github.com
Fri Aug 26 11:20:40 UTC 2022
To elaborate, the culprit is that a tilde is considered a "magic" char and thus is passed to `glob(3)` for expansion (as @yangchenguang94 correctly noted above) where it (and `rpmGlob()` by extension) doesn't produce any matches. Since we currently ignore such unmatched globs in `rpm --query --package`, they're just silently skipped.
This is being changed in #2159 where an unmatched glob is returned, making the code actually try to open it, just like it would a non-glob filename, which fails with a proper error message and return code.
The actual root cause here is the that the tilde has different semantics based on where it appears in a path, i.e. it's the home directory path or a version modifier, respectively, and we treat it as the former in `rpmGlob()`. This is not being changed in the above PR, however that doesn't matter much as the outcome will be the same.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2069#issuecomment-1228372268
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2069/1228372268 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220826/ce1ccab2/attachment.html>
More information about the Rpm-maint
mailing list