From a9479ad75a667a24ed303e1fd6c8b735c481dff5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 9 Aug 2009 02:45:35 +0200 Subject: [PATCH] When removing a package, continue if there are missing files. --HG-- extra : convert_revision : 2324cdb902b7aeeabe745e70341da3951efb749e --- lib/remove.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/remove.c b/lib/remove.c index 25413662403..ecacb82156a 100644 --- a/lib/remove.c +++ b/lib/remove.c @@ -193,18 +193,20 @@ files: prop_dictionary_get_cstring_nocopy(obj, "sha256", &sha256); rv = xbps_check_file_hash(path, sha256); - if (rv != 0 && rv != ERANGE) { + if (rv == ENOENT) { free(path); - prop_object_iterator_release(iter); - return rv; - } - if (rv == ERANGE) { + continue; + } else if (rv == ERANGE) { if (flags & XBPS_VERBOSE) printf("WARNING: SHA256 doesn't match " "for %s %s, ignoring...\n", curftype, file); free(path); continue; + } else if (rv != 0 && rv != ERANGE) { + free(path); + prop_object_iterator_release(iter); + return rv; } if ((rv = remove(path)) == -1) { if (flags & XBPS_VERBOSE)