On Wed, 2024-05-08 at 10:38 -0700, Brad Smith wrote: > I help maintain a package where upstream changed the process to > generate installed documentation. In version 1.30 and newer, the spec > file needs to use process A; in versions older than 1.30 (e.g. 1.29.x, > etc) the spec file needs to use process B. I am struggling to find a > workable solution to testing the version like this. > > Can someone please point me in the right direction? Or useful example? There are various strategies for parsing versions, it depends on the upstream version scheme. But I'd actually suggest looking if you can do this indirectly: instead of checking for the version, check for some other marker that indicates which approach you need to use. For instance, maybe some file or other will be present in one case but not the other; can you not just test for that, and choose the process to use based on the result? -- Adam Williamson (he/him/his) Fedora QA Fedora Chat: @adamwill:fedora.im | Mastodon: @adamw@xxxxxxxxxxxxx https://www.happyassassin.net -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue