xbps_remove_pkg: recover from an assertion if pkg meta plist doesn't exist.
This commit is contained in:
parent
01e67d1394
commit
556bbd495e
@ -239,7 +239,8 @@ xbps_remove_pkg(struct xbps_handle *xhp,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
pkgd = xbps_metadir_get_pkgd(xhp, pkgname);
|
pkgd = xbps_metadir_get_pkgd(xhp, pkgname);
|
||||||
assert(pkgd);
|
if (pkgd == NULL)
|
||||||
|
goto out1;
|
||||||
|
|
||||||
/* If package was "half-removed", remove it fully. */
|
/* If package was "half-removed", remove it fully. */
|
||||||
if (state == XBPS_PKG_STATE_HALF_REMOVED)
|
if (state == XBPS_PKG_STATE_HALF_REMOVED)
|
||||||
@ -337,6 +338,7 @@ purge:
|
|||||||
"purge ACTION: %s", pkgver, strerror(rv));
|
"purge ACTION: %s", pkgver, strerror(rv));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
out1:
|
||||||
/*
|
/*
|
||||||
* Remove package metadata plist.
|
* Remove package metadata plist.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user