- add -I/usr/include/nptl, Conflicts: kernel < 2.4.20.
- dynamically link /bin/rpm, link against good old -lpthread.
- 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:
- loosely wire beecrypt library into rpm.
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.32
+Release: 0.33
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL
%{__prefix}/include/popt.h
%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.
- 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
- statically link against /usr/lib/nptl/libpthread.a, if present.
/*
* 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,
* for any rpmdb access.
*
* the DBENV should provide it's own locking scheme. So try to
* acquire a lock, but permit failures, as some other
* 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 &&
(!dbi->dbi_use_dbenv || _lockdbfd++ == 0))
rc = fcntl(fdno, F_SETLK, (void *) &l);
if (rc) {
- /* Warning only if using CDB locking. */
+ /* Warning iff using non-private CDB locking. */
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);
rpmError( (rc ? RPMERR_FLOCK : RPMWARN_FLOCK),
_("cannot get %s lock on %s/%s\n"),