Discussion:
Naive question: boolean dependency
devzero2000
2008-02-04 10:40:35 UTC
Permalink
Hi to all

I have not found recent documentation, so this post.

It is possible to express boolean dependencies in RPM?

For example i would like to say that a package depends on if another
package is not installaed.
Or if could express OR dependency, eventually based also on version number :
e.g.
as in Requires: (pkg <=1.0.3) | (pkg>=1.9.3)


Thanks in advance
jagdish ahir
2008-02-05 06:33:20 UTC
Permalink
I think you sould use yum server. through yum server installation every
dependency will taken itself. you don't need to search any dependency.
Post by devzero2000
Hi to all
I have not found recent documentation, so this post.
It is possible to express boolean dependencies in RPM?
For example i would like to say that a package depends on if another
package is not installaed.
Or if could express OR dependency, eventually based also on version number
: e.g.
as in Requires: (pkg <=1.0.3) | (pkg>=1.9.3)
Thanks in advance
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Tony Earnshaw
2008-02-05 07:00:42 UTC
Permalink
Post by devzero2000
I have not found recent documentation, so this post.
This cost me about 3 minutes of imaginative Googling:
http://docs.fedoraproject.org/drafts/rpm-guide-en/

I have both this and Maximum on my hard disk and indexed for searching
on single words with swish-e.
Post by devzero2000
It is possible to express boolean dependencies in RPM?
Yes. grep -ir for examples in /usr/lib/rpm.
Post by devzero2000
For example i would like to say that a package depends on if another
package is not installaed.
Or if could express OR dependency, eventually based also on version
number : e.g.
as in Requires: (pkg <=1.0.3) | (pkg>=1.9.3)
The above hasn't anything to do with Boolean switches but is given with
the Requires: and/or BuildRequires: definitions.

Best,

--Tonni
--
Tony Earnshaw
Email: tonni at hetnet dot nl
devzero2000
2008-02-05 10:10:49 UTC
Permalink
http://docs.fedoraproject.org/drafts/rpm-guide-en/

I have bought the book a few years ago: i talk about RPM 4.1. The online
version lacks some chapter also.

MAXIMUN RPM is all about RPM 3.0.x - used in redhat 6.2 if i remember
correctly and yes, also on AIX 5.3

Today we have at least 4.4.3.x.y.z(www.rpm.org), Mandriva also 4.4.6. Some
evolution and new features have occurred from 4.1
Post by Tony Earnshaw
The above hasn't anything to do with Boolean switches but is given with
the Requires: and/or BuildRequires: definitions.

Probably I spoke badly, but I wanted to ask the question as raised by this
comparison chart
http://kitenet.net/~joey/pkg-comp/#foot11<http://kitenet.net/%7Ejoey/pkg-comp/#foot11>
Post by Tony Earnshaw
Yes. grep -ir for examples in /usr/lib/rpm.
I haven't found any, but probably i haven't looked well.


I have
Post by Tony Earnshaw
Post by devzero2000
I have not found recent documentation, so this post.
http://docs.fedoraproject.org/drafts/rpm-guide-en/
I have both this and Maximum on my hard disk and indexed for searching
on single words with swish-e.
Post by devzero2000
It is possible to express boolean dependencies in RPM?
Yes. grep -ir for examples in /usr/lib/rpm.
Post by devzero2000
For example i would like to say that a package depends on if another
package is not installaed.
Or if could express OR dependency, eventually based also on version
number : e.g.
as in Requires: (pkg <=1.0.3) | (pkg>=1.9.3)
The above hasn't anything to do with Boolean switches but is given with
the Requires: and/or BuildRequires: definitions.
Best,
--Tonni
--
Tony Earnshaw
Email: tonni at hetnet dot nl
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Jeff Johnson
2008-02-05 23:29:43 UTC
Permalink
rpm has never had support for alternation (as in A | B) through Requires:

All dependencies are implictly && (except for triggers which are naturally
||).

What can serve instead of saying
Requires: A | B
is having multiple provides and virtual dependencies, but
that quickly gets complicated.

There's no real reason why alternation could not be done. I looked
at related issues last May while implementing a compound &&
so that one could naturally say
Requires: foo.i386
where the N.A form implies that i386 must match in the same package.
I implemented negated dependencies like
Requires: !foo
at the same time (Requires: !foo is formally analogous to Conflicts: foo,
there is a similar symmetry between Provides: and Obsoletes:)

Likely dependency ranges are more important to implement than having the
ability to
specify alternate comparisons. I would have implemented last May but there
was no obvious consensus on what the syntax should be when I asked.

73 de Jeff
Michael Jennings
2008-02-06 04:49:12 UTC
Permalink
On Tuesday, 05 February 2008, at 08:00:42 (+0100),
Post by Tony Earnshaw
Post by devzero2000
It is possible to express boolean dependencies in RPM?
Yes. grep -ir for examples in /usr/lib/rpm.
Please share some. I would love to see them.
Post by Tony Earnshaw
Post by devzero2000
Requires: (pkg <=1.0.3) | (pkg>=1.9.3)
The above hasn't anything to do with Boolean switches but is given with the
Requires: and/or BuildRequires: definitions.
Please illustrate.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"Overflow on /dev/null. Please empty the bit bucket." -- fortune
Loading...