Bug 79024 - BROKEN: rpm --redhatprovides <package>
Summary: BROKEN: rpm --redhatprovides <package>
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpmdb-redhat
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Powers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-04 17:17 UTC by Fred Richardson
Modified: 2008-05-01 15:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-28 20:30:07 UTC

Attachments (Terms of Use)

Description Fred Richardson 2002-12-04 17:17:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
On my system, running:
    rpm --redhatprovides <package>
Never produces a correct result.  For example:
    rpm --redhatprovides gcc
    no package provides gcc

The problem is caused by the macro expansion for "redhatprovides" in the file
/usr/lib/rpm/rpmpopt-4.1 to specify the search path for the redhat rpmdb.

The macro specifies the use of:

Which on my system expands to (using "rpm -E ..."):

Which does not exist.  The package "rpmdb-redhat" is installed instead under the

So I can attain the correct results by using the following command:
    rpm --dbpath /usr/lib/rpmdb/i386-redhat-linux/redhat/ -q --whatprovides gcc
which produces the expected result:

One simple "work-around" for the problem is to create a symbolic link under
/usr/lib/rpmdb.  The "rpmdb-redhat" package could be updated to create this link
during installation using the same macro.

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

How reproducible:

Steps to Reproduce:
1.rpm --redhatprovides rpm

Actual Results:  # rpm --redhatprovides rpm
no package provides rpm

Expected Results:  # rpm --redhatprovides rpm

Additional info:

Comment 1 Tim Powers 2002-12-04 17:23:01 UTC
Hmm. Workd for me on my athlon box without incident. Jeff, do you know what's
going on here?

Comment 2 Tim Powers 2003-01-28 19:58:39 UTC
Jeff, second call. Any idea what the problem may be? I haven't been able to
reproduce this at all without changing the defaults.


Comment 3 Jeff Johnson 2003-01-28 20:17:52 UTC
Yes, the _arch macro was borked if redhat-rpm-config
not installed with rpm-4.1-1.06.

No longer a problem afaik.

There is gonna be a new problem with __db*
files in rpmdb-redhat.

    rm -f /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat/__db*
 should fix

Comment 4 Tim Powers 2003-01-28 20:30:07 UTC
OK. This is in the current rpmdb-rebhat package which is in the latest Phoebe beta:

rm -f %{rpmdbpath}/__db* > /dev/null 2>&1 || :
rm -f %{rpmdbpath}/__db* > /dev/null 2>&1 || :

So that should do it for future releases.

I'm closing this with the resolution as "rawhide" since Jeff provided the
information for how to work around the problem (re-install the rpmdb-redhat
package after rpm-4.1-1.06 is intalled), and since we're removing the lock files
after we install, and before we uninstall. 

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