RPM Community Forums

Mailing List Message of <rpm-devel>

Re: status on porting rpm5 to qnx

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 25 Jan 2008 - 21:22:56 CET
Message-Id: <CA790CFE-E8BB-4300-A518-BBCB870B0D45@mac.com>

On Jan 25, 2008, at 2:59 PM, Peter Kalbus wrote:

> thank you for the help.
>
> perhaps my question is stupid, but what is " global shared/exclusive  
> fcntl lock"?
>

Databases have special needs, an rpmdb is no different.

Consider what happens when 2 processes try to write the
same database record: one process will win, the other will lose,
and its indeterminate which is/was correct.

The patch to use DB_PRIVATE w db-4.6.21 also disables all locking in  
Berkeley DB.

Which is perfectly OK if another means of establishing
shared read and exclusive write access to the rpmdb database
is done externalloy to Berkeley DB.

The usual implementation for locking uses fcntl(2), where rpm --query
uses a shared read lock, and rpm --upgrade uses an exclusive write
lock.

rpm has 2 fcntl locking schemes already implemented, so
the next step will be to enable one or the other fcntl locking
implementation.

But what I need to hear from you first is that rpm on
QNX can install a package, and that "rpm -qi package"
is functional with the patch to use DB_PRIVATE I sent.

The patch works for me, but I'm not running QNX.

Does that help explain?

73 de Jeff
Received on Fri Jan 25 21:23:04 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.