[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:39:57 UTC 2025


@pmatilai commented on this pull request.



> +    std::error_code ec;
+    std::error_code ec2;
+    fs::path oldmacros = home / ".rpmmacros";
+    fs::path oldrpmrc = home / ".rpmrc";
+    fs::path lockfile = home / ".rpmrc_conversion_lock";
+    fs::path macros_target = "";
+    fs::path rpmrc_target = "";
+
+    if (userdir.substr(0, 2) == "~/")
+	userdir.replace(0, 1, home);
+
+    fs::path userdir_path = userdir;
+    fs::path newmacros = userdir_path / "macros";
+    fs::path newrpmrc = userdir_path / "rpmrc";
+
+    if (!isatty(0)) /* only on interactive runs */

Move this to the caller side, there's no reason to go through all this init work if we're not going to bother.
And, use the symbol instead of 0.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3750#pullrequestreview-2910106266
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3750/review/2910106266 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250609/2bfea394/attachment.htm>


More information about the Rpm-maint mailing list