xbps_transaction_install_pkg: properly fix previous commit.
This commit is contained in:
parent
bd3a8982cc
commit
f9c72e1d06
@ -254,16 +254,21 @@ xbps_transaction_install_pkg(const char *pkg, bool reinstall)
|
|||||||
exact = true;
|
exact = true;
|
||||||
bypattern = false;
|
bypattern = false;
|
||||||
best = false;
|
best = false;
|
||||||
pkgd = xbps_pkgdb_get_pkgd(pkg, bypattern);
|
|
||||||
pkgname = xbps_pkg_name(pkg);
|
|
||||||
assert(pkgname != NULL);
|
|
||||||
pkgd = xbps_pkgdb_get_pkgd(pkgname, false);
|
|
||||||
free(pkgname);
|
|
||||||
} else {
|
} else {
|
||||||
exact = false;
|
exact = false;
|
||||||
bypattern = false;
|
bypattern = false;
|
||||||
best = true;
|
best = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (exact) {
|
||||||
|
pkgname = xbps_pkg_name(pkg);
|
||||||
|
assert(pkgname != NULL);
|
||||||
|
pkgd = xbps_pkgdb_get_pkgd(pkgname, false);
|
||||||
|
free(pkgname);
|
||||||
|
} else {
|
||||||
|
pkgd = xbps_pkgdb_get_pkgd(pkg, bypattern);
|
||||||
|
}
|
||||||
|
|
||||||
if (pkgd != NULL) {
|
if (pkgd != NULL) {
|
||||||
if (xbps_pkg_state_dictionary(pkgd, &state) != 0) {
|
if (xbps_pkg_state_dictionary(pkgd, &state) != 0) {
|
||||||
prop_object_release(pkgd);
|
prop_object_release(pkgd);
|
||||||
|
Loading…
Reference in New Issue
Block a user