When executing the INSTALL/REMOVE scripts, always pass the UPDATE

value to them.

Bump XBPS_RELVER to 20091209.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091209151435-1yy9f7k2880tswz7
This commit is contained in:
Juan RP
2009-12-09 16:14:35 +01:00
parent 026dc6dbd9
commit eb885bbcc2
5 changed files with 26 additions and 13 deletions

View File

@@ -482,14 +482,14 @@ exec_transaction(struct transaction *trans)
prop_object_iterator_t replaces_iter;
const char *pkgname, *version, *pkgver, *instver, *filename, *tract;
int rv = 0;
bool essential, autoinst;
bool update, essential, autoinst;
pkg_state_t state = 0;
assert(trans != NULL);
assert(trans->dict != NULL);
assert(trans->iter != NULL);
essential = autoinst = false;
update = essential = autoinst = false;
/*
* Show download/installed size for the transaction.
*/
@@ -646,7 +646,14 @@ exec_transaction(struct transaction *trans)
if (!prop_dictionary_get_cstring_nocopy(obj,
"version", &version))
return errno;
if ((rv = xbps_configure_pkg(pkgname, version, false)) != 0) {
if (!prop_dictionary_get_cstring_nocopy(obj,
"trans-action", &tract))
return errno;
update = false;
if (strcmp(tract, "update") == 0)
update = true;
rv = xbps_configure_pkg(pkgname, version, false, update);
if (rv != 0) {
printf("Error configuring package %s (%s)\n",
pkgname, strerror(rv));
return rv;