Make sure that automatic/manual installation modes are set as expected.

This commit is contained in:
Juan RP
2014-10-20 07:59:06 +02:00
parent 231582e671
commit 627a5afaaf
5 changed files with 72 additions and 9 deletions

View File

@@ -32,7 +32,7 @@
int HIDDEN
xbps_transaction_store(struct xbps_handle *xhp, xbps_array_t pkgs,
xbps_dictionary_t pkgd)
xbps_dictionary_t pkgd, bool autoinst)
{
xbps_array_t replaces;
const char *pkgver;
@@ -44,8 +44,7 @@ xbps_transaction_store(struct xbps_handle *xhp, xbps_array_t pkgs,
/*
* Add required objects into package dep's dictionary.
*/
if (!xbps_dictionary_get(pkgd, "automatic-install") &&
!xbps_dictionary_set_bool(pkgd, "automatic-install", true))
if (autoinst && !xbps_dictionary_set_bool(pkgd, "automatic-install", true))
return EINVAL;
/*