When removing a package, continue if there are missing files.
--HG-- extra : convert_revision : 2324cdb902b7aeeabe745e70341da3951efb749e
This commit is contained in:
parent
f8819462b0
commit
a9479ad75a
1 changed files with 7 additions and 5 deletions
12
lib/remove.c
12
lib/remove.c
|
@ -193,18 +193,20 @@ files:
|
||||||
prop_dictionary_get_cstring_nocopy(obj,
|
prop_dictionary_get_cstring_nocopy(obj,
|
||||||
"sha256", &sha256);
|
"sha256", &sha256);
|
||||||
rv = xbps_check_file_hash(path, sha256);
|
rv = xbps_check_file_hash(path, sha256);
|
||||||
if (rv != 0 && rv != ERANGE) {
|
if (rv == ENOENT) {
|
||||||
free(path);
|
free(path);
|
||||||
prop_object_iterator_release(iter);
|
continue;
|
||||||
return rv;
|
} else if (rv == ERANGE) {
|
||||||
}
|
|
||||||
if (rv == ERANGE) {
|
|
||||||
if (flags & XBPS_VERBOSE)
|
if (flags & XBPS_VERBOSE)
|
||||||
printf("WARNING: SHA256 doesn't match "
|
printf("WARNING: SHA256 doesn't match "
|
||||||
"for %s %s, ignoring...\n",
|
"for %s %s, ignoring...\n",
|
||||||
curftype, file);
|
curftype, file);
|
||||||
free(path);
|
free(path);
|
||||||
continue;
|
continue;
|
||||||
|
} else if (rv != 0 && rv != ERANGE) {
|
||||||
|
free(path);
|
||||||
|
prop_object_iterator_release(iter);
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
if ((rv = remove(path)) == -1) {
|
if ((rv = remove(path)) == -1) {
|
||||||
if (flags & XBPS_VERBOSE)
|
if (flags & XBPS_VERBOSE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue