Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Change database information

 
   Soft32 Home -> Linux -> Partner Relationship Management RSS
Next:  Inconsistent results from ``rpm --checksig''.  
Author Message
Ashwin Bihari

External


Since: May 12, 2004
Posts: 1



(Msg. 1) Posted: Wed May 12, 2004 4:58 am
Post subject: Change database information
Archived from groups: linux>redhat>rpm (more info?)

Greetings,

I've got an interesting (to me, at least. Smile ) scenario with RPMs here
that I would like some help with.

I'm creating the root file system for an embedded target using RPMs
appropriate for that target. I will be taking a list of RPM packages
that comprise of the rootfs and then "installing" them into a
directory under a user directory, then package that directory and
deploy to the target.

The way I go about this is.

In user "builder"'s directory.

Assume the path is: /home/builder/project

<builder>: rpm --initdb --dbpath `pwd`/database
<builder>: rpm -ivh --dbpath `pwd`/database --prefix `pwd`/rootfs
<list of rpms>

Once all the packages are installed, the rootfs directory contains all
the files and the database directory contains the database. I can then
do:

<builder>: rpm -qa --dbpath `pwd`/database

and get a list of all installed packages. When I do a "-ql" on an
installed package, I get the list, but everything is prefixed with
/home/builder/project/.../..., which is what I expect because I used
the "--prefix" option during the RPM install.

Now I take the database directory and populate it into the rootfs
directory under /var/lib/rpm.

I now move the rootfs onto the target and boot it. Everything works
fine. I can do a "rpm -qa" on the target and get the list of packages,
doing a "tpm -ql" on a package lists the files as being under
/home/builder/project/.../.... Trying to verify the list obviously
fails, because the root directory is wrong.

My question, phew, is what can I do on the target with the database
that has been created elsewhere that will allow me to rebase the files
from "/home/builder/project" => "/".

Rebuilding the database doesn't do this, I didn't see any other RPM
options that dealt with this specifically.

On the other hand, if this isn't possible on the target. Is thre
anything I can don the Host machine while installing the RPMs that
will allow me to place them in a user directory and not have the
/home/builder/project stuff in?

Regards
Back to top
Login to vote
Display posts from previous:   
Related Topics:
RPM database - Ive heard that sometimes you need to rebuild the database. Why does this have to be done? Ive just upgraded to KDE 3.2....

RPM database codeset - I'm writing an utility to retrieve information from RPM installation databases. On the machines where I'm testing the..

RPM Database problem.. - Hello there, I a using Redhat v9.0 After a while, I execute a normal : rpm --rebuilddb (as root) -> Error: db4 erro...

rpm database problem - hi all; I need to get rid of an old qmail rpm but when I do a rpm -e qmail I get : error: "qmail" specifies...

multiple entries in RPM database - Hi, I've installed a package during test multiple times using --force. The package is now listed more then once in the...

concurrent access to RPM database - We are running rpm-4.0.4-7x.18 on Redhat 7.3 and need to have concurrent access to the RPM database (readonly would get...
       Soft32 Home -> Linux -> Partner Relationship Management All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]