[Rpm-maint] [rpm-software-management/rpm] Move ~/.rpmmacros and ~/.rpmrc to ~/.config/rpm/ (PR #3750)
Panu Matilainen
notifications at github.com
Mon Jun 9 13:48:46 UTC 2025
@pmatilai commented on this pull request.
> + if (fd < 0)
+ return -1;
+ close(fd);
+
+ /* recheck after acquiring lock */
+ if ((!fs::is_regular_file(oldmacros) && !fs::is_regular_file(oldrpmrc)) ||
+ fs::exists(userdir_path)) {
+ fs::remove(lockfile, ec);
+ return -1;
+ }
+
+ fs::create_directories(userdir_path, ec);
+ if (ec) goto err2;
+
+ if (fs::is_regular_file(oldmacros)) {
+ fs::copy(oldmacros, newmacros, ec);
I do dislike the copy. It'll mess timestamps and special permissions for no real reason, and somebody besides me is going to be unhappy about that. I think we should just move these files - if it crosses a filesystem then that's yet another special case we want to leave alone anyhow.
I thought I mumbled something about this earlier but apparently not, guess I deemed it safer at least as of that version, and didn't.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3750#pullrequestreview-2910132123
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3750/review/2910132123 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250609/8cd805ad/attachment.htm>
More information about the Rpm-maint
mailing list