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();
|
||||
|
||||
memset(&buf, 0, sizeof(buf));
|
||||
if (realpath(path, buf) == NULL)
|
||||
abort();
|
||||
if (realpath(path, buf) == NULL) {
|
||||
xbps_error_printf("%s: broken symlink `%s': "
|
||||
"%s\n", pkgname, file, strerror(errno));
|
||||
test_broken = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
free(path);
|
||||
if (strcmp(xhp->rootdir, "/") && strstr(buf, xhp->rootdir))
|
||||
|
Loading…
Reference in New Issue
Block a user