- error on exclusive Packages fcntl lock if DB_ENV_PRIVATE is set.
CVS patchset: 5953 CVS date: 2002/12/20 18:25:59
This commit is contained in:
parent
1a49f5b1ac
commit
ec1cec8763
1
CHANGES
1
CHANGES
|
@ -62,6 +62,7 @@
|
||||||
- add -I/usr/include/nptl, Conflicts: kernel < 2.4.20.
|
- add -I/usr/include/nptl, Conflicts: kernel < 2.4.20.
|
||||||
- dynamically link /bin/rpm, link against good old -lpthread.
|
- dynamically link /bin/rpm, link against good old -lpthread.
|
||||||
- test pthread_{mutex,cond}attr_setpshared(), add DB_ENV_PRIVATE if not.
|
- test pthread_{mutex,cond}attr_setpshared(), add DB_ENV_PRIVATE if not.
|
||||||
|
- error on exclusive Packages fcntl lock if DB_ENV_PRIVATE is set.
|
||||||
|
|
||||||
4.0.4 -> 4.1:
|
4.0.4 -> 4.1:
|
||||||
- loosely wire beecrypt library into rpm.
|
- loosely wire beecrypt library into rpm.
|
||||||
|
|
|
@ -16,7 +16,7 @@ Name: rpm
|
||||||
%define version @VERSION@
|
%define version @VERSION@
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
%{expand: %%define rpm_version %{version}}
|
%{expand: %%define rpm_version %{version}}
|
||||||
Release: 0.32
|
Release: 0.33
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
|
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
|
||||||
Copyright: GPL
|
Copyright: GPL
|
||||||
|
@ -456,9 +456,10 @@ exit 0
|
||||||
%{__prefix}/include/popt.h
|
%{__prefix}/include/popt.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Dec 20 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.32
|
* Fri Dec 20 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.33
|
||||||
- dynamically link /bin/rpm, link against good old -lpthread.
|
- dynamically link /bin/rpm, link against good old -lpthread.
|
||||||
- test pthread_{mutex,cond}attr_setpshared(), add DB_ENV_PRIVATE if not.
|
- test pthread_{mutex,cond}attr_setpshared(), add DB_ENV_PRIVATE if not.
|
||||||
|
- error on exclusive Packages fcntl lock if DB_ENV_PRIVATE is set.
|
||||||
|
|
||||||
* Thu Dec 19 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.31
|
* Thu Dec 19 2002 Jeff Johnson <jbj@redhat.com> 4.2-0.31
|
||||||
- statically link against /usr/lib/nptl/libpthread.a, if present.
|
- statically link against /usr/lib/nptl/libpthread.a, if present.
|
||||||
|
|
10
rpmdb/db3.c
10
rpmdb/db3.c
|
@ -1259,7 +1259,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lock a file using fcntl(2). Traditionally this is Packages,
|
* Lock a file using fcntl(2). Traditionally this is Packages,
|
||||||
* the file used * to store metadata of installed header(s),
|
* the file used to store metadata of installed header(s),
|
||||||
* as Packages is always opened, and should be opened first,
|
* as Packages is always opened, and should be opened first,
|
||||||
* for any rpmdb access.
|
* for any rpmdb access.
|
||||||
*
|
*
|
||||||
|
@ -1271,6 +1271,9 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
|
||||||
* the DBENV should provide it's own locking scheme. So try to
|
* the DBENV should provide it's own locking scheme. So try to
|
||||||
* acquire a lock, but permit failures, as some other
|
* acquire a lock, but permit failures, as some other
|
||||||
* DBENV player may already have acquired the lock.
|
* DBENV player may already have acquired the lock.
|
||||||
|
*
|
||||||
|
* With NPTL posix mutexes, revert to fcntl lock on non-functioning
|
||||||
|
* glibc/kernel combinations.
|
||||||
*/
|
*/
|
||||||
if (rc == 0 && dbi->dbi_lockdbfd &&
|
if (rc == 0 && dbi->dbi_lockdbfd &&
|
||||||
(!dbi->dbi_use_dbenv || _lockdbfd++ == 0))
|
(!dbi->dbi_use_dbenv || _lockdbfd++ == 0))
|
||||||
|
@ -1291,9 +1294,10 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
|
||||||
|
|
||||||
rc = fcntl(fdno, F_SETLK, (void *) &l);
|
rc = fcntl(fdno, F_SETLK, (void *) &l);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
/* Warning only if using CDB locking. */
|
/* Warning iff using non-private CDB locking. */
|
||||||
rc = ((dbi->dbi_use_dbenv &&
|
rc = ((dbi->dbi_use_dbenv &&
|
||||||
(dbi->dbi_eflags & DB_INIT_CDB))
|
(dbi->dbi_eflags & DB_INIT_CDB) &&
|
||||||
|
!(dbi->dbi_ecflags & DB_ENV_PRIVATE))
|
||||||
? 0 : 1);
|
? 0 : 1);
|
||||||
rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK),
|
rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK),
|
||||||
_("cannot get %s lock on %s/%s\n"),
|
_("cannot get %s lock on %s/%s\n"),
|
||||||
|
|
Loading…
Reference in New Issue