Add noextract configuration option

Closes #208
Fixes #165
This commit is contained in:
Duncan Overbruck
2020-01-18 14:49:59 +01:00
parent ef9260a16e
commit 6794077efd
10 changed files with 269 additions and 3 deletions

View File

@ -95,6 +95,9 @@ check_pkg_files(struct xbps_handle *xhp, const char *pkgname, void *arg)
while ((obj = xbps_object_iterator_next(iter))) {
xbps_dictionary_get_cstring_nocopy(obj, "file", &file);
/* skip noextract files */
if (xhp->noextract && xbps_patterns_match(xhp->noextract, file))
continue;
path = xbps_xasprintf("%s/%s", xhp->rootdir, file);
xbps_dictionary_get_cstring_nocopy(obj,
"sha256", &sha256);
@ -150,6 +153,9 @@ check_pkg_files(struct xbps_handle *xhp, const char *pkgname, void *arg)
while ((obj = xbps_object_iterator_next(iter))) {
xbps_dictionary_get_cstring_nocopy(obj, "file", &file);
/* skip noextract files */
if (xhp->noextract && xbps_patterns_match(xhp->noextract, file))
continue;
path = xbps_xasprintf("%s/%s", xhp->rootdir, file);
if (access(path, R_OK) == -1) {
if (errno == ENOENT) {