i'm creating rpm , need check version of java 8 installed on machine.
the problem oracle provides version-tied rpms names jdk1.8.0_45 , redhat provides rpms names java-oracle-8. don't care 1 installed, long 1 of them installed, how can define or condition logic on java 8? (note rhel5 or rhel6 target, new fangled features can't used)
as far i'm aware rpm has no such functionality. cannot declare requirement this.
that being said rpm have, , used rough equivalent this, concept of "provides".
any package can provide: some_capability , other packages can require: some_capability same way can require: <some_package>.
you can require: /some/file/path if absolutely necessary (though avoid whenever possible).
so, need compare provided capabilities of rpms care , common capability can depend on instead. there's in common there can use. if there isn't left no choice other drop requirement in rpm , hope have , detect @ runtime (with startup script perhaps).
(technically check during %pre , exit failure if can't find java somewhere strongly recommend not doing that.)
Comments
Post a Comment