[Rpm-maint] Feature Request: Optional semantics

Roy A. Gilmore rag at ragged-software.com
Fri Sep 28 17:35:46 UTC 2012

I would like to see the following dependency tag(s):

  Optional: <dependency>
  Optional(<scriptlet>): <dependency>

The "Optional:" dependency tag would be used to describe a situation
where a package is not required, but, if it is installed, has an EVR
(Epoch-Version-Revision) dependency. Useful for (among other things) a
loosely coupled suite of packages. I would also like to see the
following companion macro and script:

  %__find_optional    /usr/lib/rpm/find-optional

The "%__find_optional" macro and "find-optional" script would work
similar to "%__find_requires", it would automatically mark all
sub-packages of a package as mutually "Optional" to each other. Since
"%__find_requires" and "%__find_optional" will sometime conflict, and
while this should be obvious, to be more complete, "Requires" should
override "Optional".

And, finally, a build dependency tag:

  BuildOptional: <dependency>

Most of what this would do is already handled by "--with" and
"--without" conditional build semantics. "BuildOptional:" is probably
not that useful at the spec file level, but, at the source RPM level it
would provide a machine readable way of documenting what "--with" and
"--without" options were available.



Roy A. Gilmore

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. (R. A. Heinlein, "Time Enough for Love", 248)

More information about the Rpm-maint mailing list