Bug 760809

Summary: add ability to use: "Requires: PackageA or PackageB" in spec file
Product: Red Hat Enterprise Linux 6 Reporter: Mick Weiss <fedora>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: low    
Version: 6.4CC: mvadkert, pknirsch
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-14 07:35:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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