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


@pmatilai commented on this pull request.



> +	       oldmacros.c_str(), newmacros.c_str());
+    if (fs::is_symlink(oldrpmrc))
+	rpmlog(RPMLOG_WARNING, "Migrated %s to %s (leaving a symlink)\n",
+	       oldrpmrc.c_str(), newrpmrc.c_str());
+
+    fs::remove(lockfile, ec);
+
+    return 0;
+undo_remove:
+    if (fs::is_symlink(oldmacros))
+	fs::remove(oldmacros, ec2);
+    if (fs::is_symlink(oldrpmrc))
+	fs::remove(oldrpmrc, ec2);
+
+    if (fs::is_regular_file(newmacros))
+	fs::copy(oldmacros, newmacros, ec2);

See above for the copy() grumbling: it's not a good undo when it messes permissions and timestamps.

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

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


More information about the Rpm-maint mailing list