Move the default transaction lock out of BDB environment namespace
- We dont want the transaction lock to get mixed with the BDB environment, nor do we want it wiped out with it as the ts lock protects things *around* the environment. Unlike the environment, any fcntl locks on the file get released when process dies, so if there is a lock, there's a process alive holding it and you'd better not remove it. - Use the same lock path in macro configuration and built-in fallback - Make it a hidden file to avoid people confusing lock file existence with it actually being locked
This commit is contained in:
parent
8b9d373025
commit
c339c36144
|
@ -14,7 +14,7 @@
|
|||
|
||||
/* Internal interface */
|
||||
|
||||
#define RPMLOCK_PATH LOCALSTATEDIR "/lock/rpm/transaction"
|
||||
#define RPMLOCK_PATH LOCALSTATEDIR "/rpm/.rpm.lock"
|
||||
static const char * const rpmlock_path_default = "%{?_rpmlock_path}";
|
||||
static const char * rpmlock_path = NULL;
|
||||
|
||||
|
|
12
macros.in
12
macros.in
|
@ -759,16 +759,8 @@ print (t)\
|
|||
%_query_all_fmt %%{nvra}
|
||||
|
||||
#
|
||||
# Default path to the file used for transaction fcmtl lock.
|
||||
#
|
||||
# The previous, FHS clompliant, name was /var/lock/run/transaction,
|
||||
# but the transaction lock needs to be per-database, not global, for
|
||||
# some rpmdb operations.
|
||||
#
|
||||
# XXX Note: the file name is chosen as __db.000 to expedite
|
||||
# support issues, many users are doing "rm -f /var/lib/rpm/__db*"
|
||||
# these days.
|
||||
%_rpmlock_path %{_dbpath}/__db.000
|
||||
# Default path to the file used for transaction fcntl lock.
|
||||
%_rpmlock_path %{_dbpath}/.rpm.lock
|
||||
|
||||
#==============================================================================
|
||||
# ---- per-platform macros.
|
||||
|
|
Loading…
Reference in New Issue