Use a POSIX lock for pkgdb and only issue pkgdb writes in exact points.
- Rather than using a POSIX named semaphore use a POSIX lock (lockf(3)) for pkgdb for writers. Writers that cannot acquire the pkgdb lock will get EAGAIN rather then being blocked. - Due to using a file lock we cannot write the pkgdb every time a package is being unpacked, configured or removed. Instead pkgdb is only written at the end of a specific point in the transaction (unpack, configure, remove) or via xbps_pkgdb_unlock().
This commit is contained in:
@ -368,10 +368,6 @@ xbps_end(struct xbps_handle *xhp)
|
||||
assert(xhp);
|
||||
|
||||
xbps_pkgdb_release(xhp);
|
||||
|
||||
if (xbps_object_type(xhp->pkgdb_revdeps) != XBPS_TYPE_UNKNOWN)
|
||||
xbps_object_release(xhp->pkgdb_revdeps);
|
||||
|
||||
xbps_fetch_unset_cache_connection();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user