Bug 106844 - %_solve_dbpath macro is wrong / rpmdb-fedora package
%_solve_dbpath macro is wrong / rpmdb-fedora package
Product: Fedora
Classification: Fedora
Component: rpmdb-redhat (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Depends On:
Blocks: CambridgeBlocker 107852
  Show dependency treegraph
Reported: 2003-10-11 13:52 EDT by Michael Schwendt
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-10-25 14:42:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Schwendt 2003-10-11 13:52:59 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
In /etc/rpm/macros.solve is defined

  %_solve_dbpath /usr/lib/rpmdb/i386-redhat-linux/redhat

but the RPM database files have been moved to

  %_solve_dbpath /usr/lib/rpmdb/i386-redhat-linux/fedora


I stumbled upon this when I examined why --redhatprovides and --redhatrequires
no longer work. Cross reference: bug #106843

Version-Release number of selected component (if applicable):
Comment 1 Michael Schwendt 2003-10-14 22:25:04 EDT
Ooops! This also breaks rpm's --aid option.
Comment 2 Gene Czarcinski 2003-10-23 15:35:42 EDT
With rpmdb-fedora-0.95-0.20031022 in raawhide, the /etc/rpm/macros.solve appears
Comment 3 Chris Ricker 2003-10-23 15:50:32 EDT
--redhatprovides still doesn't work:

[kaboom@skuld kaboom]$ rpm -q --redhatprovides xpdf
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /usr/lib/rpmdb/i386-redhat-linux/redhat
no package provides xpdf
[kaboom@skuld kaboom]$ 
Comment 4 Chris Ricker 2003-10-23 15:57:54 EDT
There needs to be a s/rpmdb-redhat/rpmdb-fedora/g run against
/etc/rpm/macros.solve but other than that it looks good

Hmm, the bug isn't in macros.solve after all;

/usr/lib/rpm/rpmpopt-4.2.1 defines:

rpm alias --redhatprovides -q --define '_dbpath
/usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \
    --POPTdesc=$"find package name that contains a provided capability (needs
rpmdb-redhat package installed)"

rpm alias --redhatrequires -q --define '_dbpath
/usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \
    --POPTdesc=$"find package name that contains a required capability (needs
rpmdb-redhat package installed)"

changing those paths to /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/fedora gets
further, but then it dies trying to open
/usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/fedora/Providename, which doesn't exist
Comment 5 Chris Ricker 2003-10-23 16:02:41 EDT
Interesting. Providename gets created once you run the rpm -q --redhat* as root.
It still doesn't work after that, though
Comment 6 Chris Ricker 2003-10-23 16:11:10 EDT
Looks like the problem is that the alternate rpm db files in fedora are empty:

[kaboom@skuld fedora]$ db_dump Packages 
[kaboom@skuld fedora]$ ls -l
total 412
-rw-r--r--    1 root     root        16384 Oct 23 14:01 __db.001
-rw-r--r--    1 root     root      1318912 Oct 23 14:01 __db.002
-rw-r--r--    1 root     root       458752 Oct 23 14:01 __db.003
-rw-r--r--    1 root     root        12288 Oct 22 03:03 Packages
-rw-r--r--    1 root     root        12288 Oct 23 14:01 Providename
-rw-r--r--    1 root     root        12288 Oct 23 14:02 Requirename
[kaboom@skuld fedora]$ 
Comment 7 Gene Czarcinski 2003-10-23 17:37:02 EDT
I am not sure if the new package in rawhide is correct of not but the list of
files provided by rpmdb-fedora-0.95-0.20031010.i386.rpm which is on the test3
isos and the package now in rawhide differ significantly:

 rpm -qlp /home/redhat/severn/i386/RedHat/RPMS/rpmdb-fedora-0.95-0.20031010.i386.rpm

rpm -ql rpmdb-fedora
Comment 8 Michael Schwendt 2003-10-23 20:46:04 EDT
For --redhat{provides,requires} see bug #106843.
Comment 9 Michael Schwendt 2003-10-25 14:42:00 EDT
rpmdb-fedora-0.95-0.20031024 fixes this for me:

* macros.solve: %_solve_dbpath is correct
* --aid: works again

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