Fix reinstallation of pkgs in repolock mode.
At the time we've been searching for the pkg in a repo, no repos were registered resulting in EINVAL. While here, if there's no declared repos return ENOENT instead.
This commit is contained in:
@@ -108,8 +108,10 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall,
|
||||
/* find update from repo */
|
||||
xbps_dictionary_get_cstring_nocopy(pkg_pkgdb, "repository", &repoloc);
|
||||
assert(repoloc);
|
||||
if ((repo = xbps_rpool_get_repo(repoloc)) == NULL)
|
||||
return EINVAL;
|
||||
if ((repo = xbps_regget_repo(xhp, repoloc)) == NULL) {
|
||||
/* not found */
|
||||
return ENOENT;
|
||||
}
|
||||
pkg_repod = xbps_repo_get_pkg(repo, pkg);
|
||||
} else {
|
||||
/* find update from rpool */
|
||||
|
Reference in New Issue
Block a user