From 556bbd495eed92e33740ee73a7e18598eea2f486 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 19 Nov 2012 13:29:09 +0100 Subject: [PATCH] xbps_remove_pkg: recover from an assertion if pkg meta plist doesn't exist. --- lib/package_remove.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/package_remove.c b/lib/package_remove.c index 2d270fc8..2ee29b5c 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -239,7 +239,8 @@ xbps_remove_pkg(struct xbps_handle *xhp, goto out; } pkgd = xbps_metadir_get_pkgd(xhp, pkgname); - assert(pkgd); + if (pkgd == NULL) + goto out1; /* If package was "half-removed", remove it fully. */ if (state == XBPS_PKG_STATE_HALF_REMOVED) @@ -337,6 +338,7 @@ purge: "purge ACTION: %s", pkgver, strerror(rv)); goto out; } +out1: /* * Remove package metadata plist. */