More informative error message when lstat() in verification fails.
Eg when running verification as non-root, it can lead to confusing results until you realize you didn't have permission to verify the file. Patch originally from OpenSuSE, slightly modified.
This commit is contained in:
parent
b1c7f449f6
commit
d9281caad5
|
@ -298,6 +298,11 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
|
|||
(fileAttrs & RPMFILE_README) ? 'r' : ' '),
|
||||
rpmfiFN(fi));
|
||||
te += strlen(te);
|
||||
if ((verifyResult & RPMVERIFY_LSTATFAIL) != 0 &&
|
||||
errno != ENOENT) {
|
||||
sprintf(te, " (%s)", strerror(errno));
|
||||
te += strlen(te);
|
||||
}
|
||||
ec = rc;
|
||||
}
|
||||
} else if (verifyResult || rpmIsVerbose()) {
|
||||
|
|
Loading…
Reference in New Issue