Gather proper transaction stats (take into account binpkgs in cachedir, and "preserved" pkgs).
This commit is contained in:
16
lib/util.c
16
lib/util.c
@ -228,6 +228,22 @@ xbps_repository_pkg_path(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod)
|
||||
return xbps_xasprintf("%s/%s.%s.xbps", repoloc, pkgver, arch);
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_binpkg_exists(struct xbps_handle *xhp, xbps_dictionary_t pkgd)
|
||||
{
|
||||
char *binpkg;
|
||||
bool exists = true;
|
||||
|
||||
if ((binpkg = xbps_repository_pkg_path(xhp, pkgd)) == NULL)
|
||||
return false;
|
||||
|
||||
if (access(binpkg, R_OK) == -1)
|
||||
exists = false;
|
||||
|
||||
free(binpkg);
|
||||
return exists;
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_pkg_has_rundeps(xbps_dictionary_t pkgd)
|
||||
{
|
||||
|
Reference in New Issue
Block a user