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

Oliver Kurth notifications at github.com
Fri Jan 12 21:49:36 UTC 2024


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_FLAG_NOCONFIGS;
                    } else {
                        pr_err("unknown tsflag '%s'\n", token);
...
```
so for `RPMTRANS_FLAG_NODB` I want to build this conditionally, depending on whether `RPMTRANS_FLAG_NODB` is defined or not. As I said, I cannot use `#ifdef RPMTRANS_FLAG_NODB` because it's an enum value, not a macro. What do you recommend to do here?

FWIW, the project uses `cmake`. It's https://github.com/vmware/tdnf . Of course I could create some setting like `HAVE_RPMTRANS_FLAG_NODB` and set that as an argument to `cmake`, but I'd prefer something automatic.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2841#discussioncomment-8114545
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/2841/comments/8114545 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240112/cbd380a9/attachment.html>


More information about the Rpm-maint mailing list