xbps-bin: detect broken symlinks in the 'check' target.
This commit is contained in:
parent
edb909c899
commit
2d50109da5
@ -160,8 +160,12 @@ check_pkg_integrity(const char *pkgname)
|
|||||||
abort();
|
abort();
|
||||||
|
|
||||||
memset(&buf, 0, sizeof(buf));
|
memset(&buf, 0, sizeof(buf));
|
||||||
if (realpath(path, buf) == NULL)
|
if (realpath(path, buf) == NULL) {
|
||||||
abort();
|
xbps_error_printf("%s: broken symlink `%s': "
|
||||||
|
"%s\n", pkgname, file, strerror(errno));
|
||||||
|
test_broken = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
free(path);
|
free(path);
|
||||||
if (strcmp(xhp->rootdir, "/") && strstr(buf, xhp->rootdir))
|
if (strcmp(xhp->rootdir, "/") && strstr(buf, xhp->rootdir))
|
||||||
|
Loading…
Reference in New Issue
Block a user