xbps_pkg_is_installed(): a pkg in "unpacked" state is now accepted as installed too.
The reason is that even if the pkg was not configured, it should still be accepted as installed. If installing packages via XBPS_TARGET_ARCH, pkgs are never configured, so this must be taken into account. Will be cherry-picked to 0.37 meanwhile.
This commit is contained in:
@@ -79,10 +79,10 @@ xbps_pkg_is_installed(struct xbps_handle *xhp, const char *pkg)
|
||||
*/
|
||||
if (xbps_pkg_state_dictionary(dict, &state) != 0)
|
||||
return -1; /* error */
|
||||
if (state != XBPS_PKG_STATE_INSTALLED)
|
||||
return 0; /* not fully installed */
|
||||
if (state == XBPS_PKG_STATE_INSTALLED || state == XBPS_PKG_STATE_UNPACKED)
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
return 0; /* not fully installed */
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
Reference in New Issue
Block a user