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: @ad...@fosstodon.org
https://www.happyassassin.net



--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to