Re: "Requires" range

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

 



On Tue, 2015-09-15 at 13:44 +0100, Paul wrote:
> Thanks for the quick reply, Florian! Unfortunately, neither of these work:
> 
> >Requires: java >= 1.6
> >Conflicts: java >= 1.8
> 
> Error: foo conflicts with 1:java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64
>   You could try using --skip-broken to work around the problem
>   You could try running: rpm -Va --nofiles --nodigest

 Yeh, this isn't a good way to express the range because yum will see
the requires and then find the highest matching package which satisfies
it ... and then hit the conflicts and fail.

> >Requires: java < 1.8
> >Conflicts: java < 1.6
> 
> Error: Package: foo (bar)
>             Requires: java < 1.8
>   You could try using --skip-broken to work around the problem
>   You could try running: rpm -Va --nofiles --nodigest

 Is this all it said? Does this machine have anything that provides
"java < 1.8" ? This range should mostly work, apart from problems you'll
hit post install where yum wants to upgrade java (assuming 1.8 is
available) but the upgrade will fail.

> >This has the disadvantage you cannot install java (depending of the
> >variant used) < 1.6 or 1.8 in parallel of your package.
> 
> That would be OK.
> 
> >The brand new rpm 4.13 could use:
> >Requires: (java = 1.6 or java = 1.7)
> 
> Sounds good, but I need to use the version that already comes with
> RHEL and CentOS. Thanks for your help.

 The new OR rule is basically a simpler way of using virtual provides,
so you can just do it the older more complex way:

pkgA: Requires: pkgA-java-backend

pkgA-java-backend16: Provides: pkgA-java-backend
                     Requires: java = 1.6

pkgA-java-backend17: Provides: pkgA-java-backend
                     Requires: java = 1.7

...of course you'll still hit the upgrade problem.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/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