Re: Conditional dependancies

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

 



Hi Rob,

On Thu, Apr 08, 2004 at 11:27:25PM +0200, Rob van der Heij wrote:

> I would like my package to conditionally require some version of another
> package, like "if you have package foo then you need nn.nn or better"

But these "conditionals" will be evaluated at build time, so they
apply to the build host, is that ok?  You could then do something
like (untested, YMMV, but you get the idea):

%if %(test rpm --quiet foo && echo 1 || echo 0)
Requires: bar >= 10.2
%else
Requires: bar < 10.2
%endif

> Don't see how I can do that with manual dependencies. And I don't think
> the preinstall script can refuse installation either, can it?

Well, you could let the preinstall script fail, but this is dirty
and absolutely "not done" I think.

Cheers,

-- 
--    Jos Vos <jos@xxxxxx>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux