Bug 79024 - BROKEN: rpm --redhatprovides <package>
BROKEN: rpm --redhatprovides <package>
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpmdb-redhat (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Powers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-04 12:17 EST by Fred Richardson
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-28 15:30:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Fred Richardson 2002-12-04 12:17:06 EST
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
produces
    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:
    /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat

Which on my system expands to (using "rpm -E ..."):
    /usr/lib/rpmdb/i686-redhat-linux/redhat

Which does not exist.  The package "rpmdb-redhat" is installed instead under the
path:
    /usr/lib/rpmdb/i386-redhat-linux/redhat

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:
    gcc-3.2-7

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):
rpmdb-redhat-8.0-0.20020910


How reproducible:
Always

Steps to Reproduce:
1.rpm --redhatprovides rpm
2.
3.
	

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

Expected Results:  # rpm --redhatprovides rpm
rpm-4.1-1.06
#

Additional info:
Comment 1 Tim Powers 2002-12-04 12:23:01 EST
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 14:58:39 EST
Jeff, second call. Any idea what the problem may be? I haven't been able to
reproduce this at all without changing the defaults.

Tim
Comment 3 Jeff Johnson 2003-01-28 15:17:52 EST
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.

Adding
    %post
    rm -f /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat/__db*
 should fix
     
Comment 4 Tim Powers 2003-01-28 15:30:07 EST
OK. This is in the current rpmdb-rebhat package which is in the latest Phoebe beta:

%post
rm -f %{rpmdbpath}/__db* > /dev/null 2>&1 || :
                                                                                
%preun
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.