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


@pmatilai commented on this pull request.



> +    if (fs::is_regular_file(oldmacros)) {
+	fs::remove(oldmacros, ec);
+	if (ec) goto undo_remove;
+	fs::create_symlink(macros_target , oldmacros, ec);
+	if (ec) goto undo_remove;
+    }
+    if (fs::is_regular_file(oldrpmrc)) {
+	fs::remove(oldrpmrc, ec);
+	if (ec) goto undo_remove;
+	fs::create_symlink(rpmrc_target , oldrpmrc, ec);
+	if (ec) goto undo_remove;
+    }
+
+    if (fs::is_symlink(oldmacros))
+	rpmlog(RPMLOG_WARNING, "Migrated %s to %s (leaving a symlink)\n",
+	       oldmacros.c_str(), newmacros.c_str());

Use {} blocks on multiline ifs. The compiler thinks it's a single line but it's easier on weary eyes... 

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

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


More information about the Rpm-maint mailing list