16 lines
525 B
Diff
16 lines
525 B
Diff
|
Don't bother retrying locking on read-only filesystem (RhBug:1502134)
|
||
|
|
||
|
upstream commit f25752a8cd6b161f3002dc7839242872ecb59547
|
||
|
--- ./lib/rpmlock.c.orig 2017-08-10 08:08:07.122108699 +0000
|
||
|
+++ ./lib/rpmlock.c 2017-12-05 12:02:26.248459858 +0000
|
||
|
@@ -30,7 +30,8 @@ static rpmlock rpmlock_new(const char *l
|
||
|
(void) umask(oldmask);
|
||
|
|
||
|
if (lock->fd == -1) {
|
||
|
- lock->fd = open(lock_path, O_RDONLY);
|
||
|
+ if (errno != EROFS)
|
||
|
+ lock->fd = open(lock_path, O_RDONLY);
|
||
|
if (lock->fd == -1) {
|
||
|
free(lock);
|
||
|
lock = NULL;
|