xbps_repository_install_pkg: before adding pkg into the transaction,
check that it wasn't added before. This change fixes and endless loop while doing the following: $ xbps-bin install libXext libX11 where libX11 is a dependency of libXext and was already queued. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100114125713-o9vxzayz1tnhlt96
This commit is contained in:
parent
6c27794c5b
commit
d8a025a56a
@ -342,6 +342,19 @@ xbps_repository_install_pkg(const char *pkg, bool by_pkgmatch)
|
|||||||
if ((rv = create_transaction_dictionary()) != 0)
|
if ((rv = create_transaction_dictionary()) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check that this pkg hasn't been added previously into
|
||||||
|
* the transaction.
|
||||||
|
*/
|
||||||
|
if (by_pkgmatch) {
|
||||||
|
if (xbps_find_pkg_in_dict_by_pkgmatch(trans_dict,
|
||||||
|
"unsorted_deps", pkg))
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
if (xbps_find_pkg_in_dict_by_name(trans_dict,
|
||||||
|
"unsorted_deps", pkg))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Set repository in pkg dictionary.
|
* Set repository in pkg dictionary.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user