Bug 760809 - add ability to use: "Requires: PackageA or PackageB" in spec file
Summary: add ability to use: "Requires: PackageA or PackageB" in spec file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-07 02:08 UTC by Mick Weiss
Modified: 2011-12-19 12:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-14 07:35:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mick Weiss 2011-12-07 02:08:48 UTC
Description of problem:

I'd like to add:

Requires: httpd or lighttpd

in my package. If I do "Requires: webserver" it adds some options that I don't support (like nginx, which doesn't support cgi).

Version-Release number of selected component (if applicable):


How reproducible:

Try to create an rpm that requires either one of two packages (or more).

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info: I'll take a crack at adding this myself after I get some other things done first.

Comment 2 Mick Weiss 2011-12-07 19:31:57 UTC
spoke to the devs on #rpm.org and this one isn't a good first bug. Seems boolean logic would be a lot harder to add than I thought. It would also need to be added in other places too (like yum). I'm handing this back to the default assignee, at least until I feel comfortable w/ adding this myself.

I'm imagining that I'm an edge case, so I'm marking this as a low priority. If someone else would like to see this added, then people make a comment and change the priority to normal.

Comment 3 Panu Matilainen 2011-12-14 07:28:19 UTC
Actually this is one of the more popular rpm feature requests. But yes it's not that simple and would require support from yum & all and I just dont see this happening in rhel-6 lifetime -> nak.

The conditional in this case can be accomplished with a couple of extra (meta-)packages: you could add two sub-packages, eg mypkg-httpd and mypkg-lighttpd which both provide 'mypkg-webserver', and then have the main package require that. It's of course more cumbersome than being able to just say "Requires: httpd or lighttpd" but doable, and works with every old rpm version out there.

If you're interested in rpm development (as it appears from your comments) in general, the appropriate place for related discussions and suggestions is upstream mailing lists etc at rpm.org.

Comment 4 RHEL Program Management 2011-12-14 07:35:08 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Comment 5 Mick Weiss 2011-12-19 12:17:03 UTC
My apologies, as I originally thought this was upstream.

After talking with Panu I've resubmitted this bug to the appropriate bts:

http://rpm.org/ticket/853


Note You need to log in before you can comment on or make changes to this bug.