[Rpm-maint] [rpm-software-management/rpm] Implement rpmkeys --rebuild (PR #3474)
Panu Matilainen
notifications at github.com
Thu Nov 28 13:54:17 UTC 2024
@pmatilai commented on this pull request.
> @@ -96,6 +100,50 @@ static rpmRC write_key_to_disk(rpmPubkey key, string & dir, string & filename, i
return rc;
}
+rpmRC rebuild_dir(rpmtxn txn, keystore * store, rpmKeyring keys)
+{
+
+ auto macros = rpm::macros();
+ auto [mrc, keyringpath] = macros.expand("%{_keyringpath}");
+ while ('/' == keyringpath.back())
+ keyringpath.pop_back();
+ std::string path = rpm::expand_path({rpmtxnRootDir(txn), keyringpath});
+ std::string tmppath = keyringpath + ".tmp/";
+ std::string oldpath = keyringpath + ".rpmold/";
Include the rpmtxnRootDir() in these already, as it is you just need to duplicate that work multiple times in the below, making it harder to follow.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3474#pullrequestreview-2468243827
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3474/review/2468243827 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241128/fc8e629c/attachment.htm>
More information about the Rpm-maint
mailing list