Bug 107853

Summary: --redhatprovides and --redhatrequires do not work
Product: [Fedora] Fedora Reporter: Gene Czarcinski <gczarcinski>
Component: rpmdb-redhatAssignee: Jeff Johnson <jbj>
Status: CLOSED DEFERRED QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: chris.ricker, leonard-rh-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-05 15:09:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100643    

Description Gene Czarcinski 2003-10-23 19:48:20 UTC
Description of problem:

The macro alias definitions for --redhatprovides and --redhatrequires do not work.

I understand these are legacy BUT either

1.  remove the definitions since it is all suppose to work for failed
dependencies automagically ... BTW, is rpmdb-fedora now installed on all systems?

or

2.  change definitions to make them work with fedora

or

3.  change names to fedoraprovides and fedorarequires and correct the defintions.

Comment 1 Chris Ricker 2003-10-24 14:20:30 UTC
This is mostly a duplicate of:

Bug #106843
Bug #106844

Comment 2 Chris Ricker 2003-10-26 12:44:09 UTC
Now that the rpmdb-fedora package installs working db's, this works

[kaboom@skuld kaboom]$ rpm -q --redhatrequires xpdf
xfig-3.2.4-2
[kaboom@skuld kaboom]$ 


Comment 3 Gene Czarcinski 2003-10-27 19:38:31 UTC
This is still not working for mee ... rpmdb-fedora-0.95-0.20031027

when I do rpm -q --redhatrequires xpdf

I get:
no package requires xpdf

[done on an everything install system]

Comment 4 Gene Czarcinski 2003-10-27 21:25:42 UTC
I believe you may be using a different rpm package than that available in
rawhide (4.2.1-0.30).  I believe the /usr/lib/rpm/rpmpopt-4.2.1 file still needs
to be changed to point to the fedora directory rather than redhat (or make
redhat a sym-link to fedora).

If I do:

rpm -q --define "_dbpath /usr/lib/rpmdb/i386-redhat-linux/fedora/"
--whatrequires xpdf

Then I get:

xfig-3.2.4-2

Comment 5 Jeff Johnson 2003-10-30 13:01:56 UTC
The --redhat{provides,requires} options work just
like they always did.

What you are really asking for is --fedora{provides,requires}
added to rpmpopt. rpm cannot carry vendor specific options
as default for all possible vendors.

Either config your own --fedora* options in /etc/popt or ~/.popt
(copy, say, --redhatprovides entry from /usr/lib/rpm/rpmpopt-*,
and do s/redhat/fedora/g), or live with the replacement
for --redhatprovides, the Suggests: output that is displayed
for all installs that fail because of missing dependencies.

Comment 6 Gene Czarcinski 2003-10-30 19:26:59 UTC
"rpmdb-fedora" needs to be added to bugzilla.

I am reopening this problem and reassigning it to rpmdb since it appears to be
more of a problem with rpmdb-fedora rather than rpm.

/usr/lib/rpm/rpmpopt-4.2.1 have definitions of the form:

rpm alias --redhatprovides -q --define '_dbpath 
/usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides

and

rpm alias --redhatrequires -q --define '_dbpath 
/usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires


You will note that the directory "redhat" is hard coded.  When the
redhat->fedora change was made, rpmdb-fedora not has the directory name of "fedora".

My suggested resolution is to create a symlink of the form:

ln -s ../i386-redhat-linux-fedora/ redhat

Comment 7 Jeff Johnson 2003-11-05 15:09:04 UTC
Symlinks won't work, rpm cannot replace a directory with
a symlink.

%{_vendor} could be used in path, but then --redharprovides
is misnamed. The intent was to hardwire the vendor name
in both the option and the path.

I will retire both --redhatprovides and --redhatrequires with
description in rpm.8 man page of how to configure in /etc/popt
if you wnat/need the functionality.

Deferred until somewhen ...