Respect automatic-install mode from pkgdb in transaction updates.

Also simplify register/unregister and remove useless state definitions.
This commit is contained in:
Juan RP
2013-03-07 10:03:59 +01:00
parent 90b6803825
commit 0a1859987a
8 changed files with 15 additions and 70 deletions

View File

@@ -66,6 +66,7 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, int action)
char *pkgname;
int rv = 0;
pkg_state_t state = 0;
bool autoinst = false;
assert(pkg != NULL);
@@ -104,6 +105,11 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, int action)
repopkgver, instpkgver, repoloc);
return EEXIST;
}
/* respect current install mode from pkgdb */
prop_dictionary_get_bool(pkg_pkgdb, "automatic-install",
&autoinst);
prop_dictionary_set_bool(pkg_repod, "automatic-install",
autoinst);
}
/*
* Prepare transaction dictionary.