Re: Testing package version is spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 08, 2024 at 10:38:05AM -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?

I too think it's not a very useful thing to do.  But if you must, as
an alternative to futzing around with version numbers you might do the
simpler and probably clearer thing:

  %global use_new_docs_method 1

  %if 0%{?use_new_docs_method}
  do the new thing
  %else
  do the old thing
  %endif

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
--
_______________________________________________
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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux