[Rpm-maint] [rpm-software-management/rpm] Move ~/.rpmmacros and ~/.rpmrc to ~/.config/rpm/ (PR #3750)
Panu Matilainen
notifications at github.com
Mon Jun 9 14:05:46 UTC 2025
@pmatilai commented on this pull request.
> + fs::path newrpmrc = userdir_path / "rpmrc";
+
+ if (!isatty(0)) /* only on interactive runs */
+ return -1;
+
+ if (!fs::is_regular_file(oldmacros) && !fs::is_regular_file(oldrpmrc))
+ return -1;
+
+ int fd = open(lockfile.c_str(), O_CREAT|O_EXCL|O_WRONLY, 0644);
+ 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)) {
Confusing/misleading indentation here.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3750#pullrequestreview-2910183140
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3750/review/2910183140 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250609/c2f67ff6/attachment.htm>
More information about the Rpm-maint
mailing list