/
githubmirror
/
rpm
Обзор
Документация
Войти
/
githubmirror
/
rpm
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/oldtxn.c
25 строк
551 B
Panu Matilainen
Implement a separate lock for the keystore
22 апр 2026, 10:58
22 апр 2026, 10:58
3763620
Код
Авторство
О чём код?
#include <stdio.h> #include <rpm/rpmlib.h> #include <rpm/rpmlog.h> #include <rpm/rpmts.h> int main(int argc, char *argv[]) { int rc = EXIT_FAILURE; if (rpmReadConfigFiles(NULL, NULL) == 0) { rpmts ts = rpmtsCreate(); /* XXX it's 2026 and this is still needed :facepalm: */ rpmtsSetRootDir(ts, NULL); rpmtxn txn = rpmtxnBegin(ts, RPMTXN_WRITE); if (txn) { rpmSetVerbosity(RPMLOG_DEBUG); rc = rpmtxnRebuildKeystore(txn, NULL); rpmSetVerbosity(RPMLOG_NOTICE); rpmtxnEnd(txn); } rpmtsFree(ts); } return rc; }