xbps_remove_pkg: recover from an assertion if pkg meta plist doesn't exist.

This commit is contained in:
Juan RP 2012-11-19 13:29:09 +01:00
parent 01e67d1394
commit 556bbd495e

View File

@ -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.
*/