[Rpm-maint] [rpm-software-management/rpm] Move ~/.rpmmacros and ~/.rpmrc to ~/.config/rpm/ (PR #3750)
Panu Matilainen
notifications at github.com
Fri Jun 27 07:28:36 UTC 2025
@pmatilai commented on this pull request.
> + if (move_rpmrc && fs::is_symlink(oldrpmrc, ec2))
+ fs::remove(oldrpmrc, ec2);
+
+ if (fs::is_regular_file(newmacros, ec2))
+ fs::rename(newmacros, oldmacros, ec2);
+ if (fs::is_regular_file(newrpmrc, ec2))
+ fs::rename(newrpmrc, oldrpmrc, ec2);
+ /* userdir_path did not exist at the beginning */
+ fs::remove(userdir_path, ec2);
+err:
+ if (fs::exists(oldmacros, ec2))
+ rpmlog(RPMLOG_ERR, "Could not migrate %s to %s: %s\n",
+ oldmacros.c_str(), newmacros.c_str(), ec.message().c_str());
+ if (fs::exists(oldrpmrc, ec2))
+ rpmlog(RPMLOG_ERR, "Could not migrate %s to %s: %s\n",
+ oldrpmrc.c_str(), newrpmrc.c_str(), ec.message().c_str());
Use {} blocks on multiline ifs.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3750#pullrequestreview-2965107362
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3750/review/2965107362 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250627/e24dc883/attachment-0001.htm>
More information about the Rpm-maint
mailing list