File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ rpmlock rpmlockNew(const char *lock_path, const char *descr)
124124 if (!lock) {
125125 rpmlog (RPMLOG_ERR, _ (" can't create %s lock on %s (%s)\n " ),
126126 descr, lock_path, strerror (errno));
127+ if (errno == ENOENT && geteuid () != 0 )
128+ rpmlog (RPMLOG_ERR, _ (" \t run rpm with write permission to the rpmdb once to create the lock file\n " ));
127129 }
128130 return lock;
129131}
Original file line number Diff line number Diff line change @@ -587,16 +587,21 @@ RPMTEST_SETUP_RW([rpmdb --rebuilddb and verify empty database])
587587AT_KEYWORDS([rpmdb])
588588RPMTEST_CHECK([
589589RPMDB_RESET
590+ RPMTEST_USER
590591runroot rpmdb --rebuilddb
591592runroot ls `rpm -E "%{_dbpath}/.rpm.lock"`
592593runroot rpmdb --verifydb
593594runroot ls `rpm -E "%{_dbpath}/.rpm.lock"`
595+ runroot rm `rpm -E "%{_dbpath}/.rpm.lock"`
596+ runroot_user rpm -qa
594597],
595598[0],
596599[/var/lib/rpm-testsuite/.rpm.lock
597600/var/lib/rpm-testsuite/.rpm.lock
598601],
599- [])
602+ [error: can't create transaction lock on /var/lib/rpm-testsuite/.rpm.lock (No such file or directory)
603+ error: run rpm with write permission to the rpmdb once to create the lock file
604+ ])
600605RPMTEST_CLEANUP
601606
602607# ------------------------------
You can’t perform that action at this time.
0 commit comments