[Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
Panu Matilainen
notifications at github.com
Tue Nov 12 11:10:14 UTC 2024
The interesting part of this PR are new rpm::join_path(), rpm::expand_path() and rpm::normalize_path() functions which are more powerful C++ native counterparts of rpmGenPath(), rpmGetPath() and rpmCleanPath(), and hopefully with more meaningful names too.
rpmGenPath() and rpmGetPath() use the C++ versions internally now, which "proves" they work as promised. rpmCleanPath() can't do so because it expects to manipulate the C string buffer passed to it. We'll deprecate it as soon as we get rid of it.
The latter commits replace a few uses of rpmCleanPath() and related C-side functions with C++ native versions to further prove these work as intended, but technically they wouldn't need to be in this PR.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/3442
-- Commit Summary --
* Don't try to redefine isblank()
* Add internal C++ counterparts for path manipulation functions
* Eliminate uses of rpmCleanPath() in librpmbuild
* Eliminate use of rpmCleanPath() in relocation code
* Eliminate uses of realpath() and rpmCleanPath() in fingerprint canonDir()
* Eliminate realpath(), rpmGetPath() and rpmCleanPath() uses in query code
-- File Changes --
M build/files.cc (20)
M include/rpm/rpmfileutil.h (7)
M lib/fprint.cc (38)
M lib/query.cc (39)
M lib/relocation.cc (19)
M rpmio/macro.cc (16)
M rpmio/rpmfileutil.cc (98)
M rpmio/rpmmacro_internal.hh (10)
M tools/rpm.cc (1)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/3442.patch
https://github.com/rpm-software-management/rpm/pull/3442.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3442
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3442 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241112/156231ad/attachment-0001.html>
More information about the Rpm-maint
mailing list