Re: [Rpm-maint] [rpm-software-management/rpm] check for rpmlib version (Discussion #2841)

2024-01-15 Thread Oliver Kurth
I got that. It would be good if `rpmlib` had a macro that can just be tested, to save some work, and not having to write a hack to test for it. If you (or anyone) knows of any similar code that does that, it would be great if you can share. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] check for rpmlib version (Discussion #2841)

2024-01-12 Thread Oliver Kurth
Thanks for replying. I have this code: ``` ... } else if (strcmp(token, "nodb") == 0){ pConf->rpmTransFlags |= RPMTRANS_FLAG_NODB; } else if (strcmp(token, "noconfigs") == 0){ pConf->rpmTransFlags |= RPMTRANS_F

[Rpm-maint] [rpm-software-management/rpm] check for rpmlib version (Issue #2840)

2024-01-11 Thread Oliver Kurth
Is there a way to check at compile time for the rpmlib version? In this particular case I want to use the enum value `RPMTRANS_FLAG_NODB` of `enum rpmtransFlags_e` in `include/rpm/rpmts.h`, but stay compatible with older versions that do not have this implemented. Since it's an enum, I cannot us

Re: [Rpm-maint] [rpm-software-management/rpm] when rebuilding rpmdb database gets inconsistent when installing at the same time (#1761)

2021-08-25 Thread Oliver Kurth
Not sure why this needs to be mentioned, but obviously rebuilding the db continuously is a test scenario, not intended for everyday use. However, it does show that rebuilding the db, for example for transitioning from BDB to another db, may cause weird issues if an rpm operation happens at the s

Re: [Rpm-maint] [rpm-software-management/rpm] when rebuilding rpmdb database gets inconsistent when installing at the same time (#1761)

2021-08-24 Thread Oliver Kurth
FWIW, I tried to fix this in `tdnf` (https://github.com/vmware/tdnf) by calling `rpmtxnBegin()` just after `rpmtsCreate()`, and `rpmtxnEnd()` just before `rpmtsFree()`, and I still see this problem. Is see this in both Fedora 33 with sqlite and in Photon 4 with bdb. It does not seem related to

[Rpm-maint] [rpm-software-management/rpm] when rebuilding rpmdb database gets inconsistent when installing at the same time (#1761)

2021-08-21 Thread Oliver Kurth
There seems to be a race when locking the db using `rpm --rebuilddb`. If a package gets installed at the same time, the database gets inconsistent. To reproduce: In one shell, continuously rebuild the db: `while true; do echo "start"; rpm --rebuilddb; echo "done" ; done In another shell, instal