[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: About rpm database
- From: "Chowdhury, Chandan Dutta" <chandan-dutta chowdhury hp com>
- To: "RPM Package Manager" <rpm-list redhat com>
- Subject: RE: About rpm database
- Date: Thu, 1 Jun 2006 19:45:17 +0530
> -----Original Message-----
> From: Chowdhury, Chandan Dutta
> Sent: Wednesday, May 31, 2006 9:53 AM
> To: RPM Package Manager
> Subject: RE: About rpm database
>
>
>
> > -----Original Message-----
> > From: Jeff Johnson [mailto:n3npq jbj gmail com]
> > Sent: Monday, May 29, 2006 8:32 PM
> > To: RPM Package Manager
> > Subject: Re: About rpm database
> >
> > On 5/29/06, Chowdhury, Chandan Dutta
> > <chandan-dutta chowdhury hp com> wrote:
> > > Hello All,
> > >
> >
> > First of all, an rpmdb is a hierarchical database using Berkeley DB.
> >
> > > I have 2 questions for you
> > >
> > > 1. Can any one point me to a document describing the
> > structure of RPM
> > > database?
> > > This what all tables are present in the RPM database, what
> > all columns
> > > in them.
> > >
> >
> > First of all, an rpmdb is a hierarchical database using Berkeley DB.
> > So no SQL, no rows, no columns, no tables.
> >
> > Headers are stored as blobs in /var/lib/rpm/Packages, the key is a
> > monotonically increasing integer. The current largest values as
> > retrieved and incremented in a RMW operation using key = 0
> whose value
> > is the largest key in the rest of Packages. The key for the header
> > blob in Packages is known as a "header instance".
> >
> > All the other indices are inverted lists of certain tags
> stored within
> > a header.
> > That means that the value from the tag is used as a key to
> retrieve a
> > varibale length array of (header,element) indices.
> > In most cases, the element index is 0.
> >
> > One can replace a Berkeley DB with sqlite3 for an rpmdb, but the
> > rpm-4.4.2 that most vendors are choosing to distribute has known
> > problems with the implementation in 4.4.2.
> >
> > > 2. Is there a CLI for doing SQL queries on the RPM db, if so plz
> > > provide me the link where I can find them.
> > >
> >
> > No SQL, the CLI for accessing an rpmdb is the --query mode of rpm.
> >
> > Hint: Export all the data from an rpmdb for importing into whatever
> > SQL db you want by doing
> > rpm -qa --xml
> > or
> > rpm -qa --qf '[%{*:xml}\n]'
> >
> > 73 de Jeff
> >
>
> Hello Jeff,
>
> Thanks a lot for all the info on database. I was trying to
> understand the whole structure of rpm and did not find any
> document describing the database. Anyway thanks a lot for the
> usefull info. I will start playing with the --xml option to rpm
>
> For sure if u have any other document on the database plz share it.
>
> Thanks and Regards
> Chandan
Hello all,
I have a few more question about the rpmdb
1. In the previous mail mentions about using sqlite for backend instead
of bdb, is there a probability of rpm moving from bdb to a sqlite based
backend.
2. What is the future of the rollback feature of rpm, I have seen quite
a few mails saying not to use this feature, is it really deprecated?
3. I have a product which installs a group of rpms in one
transection(using yum/apt). For un-installation of the product I was
trying to use the same transaction key and identify the rpms for my
product. The problem is if I update one of the package in this group I
get a different transaction id. Does rpm keep track of transaction id
somehow?
AFAIR the post install script of RPM is passed a value ("$1") depending
on whether the rpm is installed for the first time or upgraded, in such
a situation is the previous transaction id preserved ?
Thanks in advance for the help for the help
Regards
Chandan Dutta Chowdhury
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]