Rename the transaction object key to "transaction" rater than "trans-action".

This commit is contained in:
Juan RP 2011-02-05 12:21:04 +01:00
parent 8803bfd7d8
commit d5c2a3266f
7 changed files with 13 additions and 13 deletions

View File

@ -186,7 +186,7 @@ show_package_list(prop_object_iterator_t iter, const char *match)
while ((obj = prop_object_iterator_next(iter)) != NULL) { while ((obj = prop_object_iterator_next(iter)) != NULL) {
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
if (strcmp(match, tract)) if (strcmp(match, tract))
continue; continue;
print_package_line(pkgver, false); print_package_line(pkgver, false);
@ -207,7 +207,7 @@ show_transaction_sizes(struct transaction *trans)
trans_inst = trans_up = trans_conf = trans_rm = false; trans_inst = trans_up = trans_conf = trans_rm = false;
while ((obj = prop_object_iterator_next(trans->iter))) { while ((obj = prop_object_iterator_next(trans->iter))) {
prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
if (strcmp(tract, "install") == 0) { if (strcmp(tract, "install") == 0) {
trans->inst_pkgcnt++; trans->inst_pkgcnt++;
trans_inst = true; trans_inst = true;
@ -453,7 +453,7 @@ exec_transaction(struct transaction *trans)
prop_dictionary_get_cstring_nocopy(obj, "version", &version); prop_dictionary_get_cstring_nocopy(obj, "version", &version);
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(obj, "filename", &filen); prop_dictionary_get_cstring_nocopy(obj, "filename", &filen);
prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
prop_dictionary_get_bool(obj, "automatic-install", &autoinst); prop_dictionary_get_bool(obj, "automatic-install", &autoinst);
prop_dictionary_get_bool(obj, "preserve", &preserve); prop_dictionary_get_bool(obj, "preserve", &preserve);
/* /*
@ -535,7 +535,7 @@ exec_transaction(struct transaction *trans)
*/ */
printf("\n[3/3] Configuring\n"); printf("\n[3/3] Configuring\n");
while ((obj = prop_object_iterator_next(trans->iter)) != NULL) { while ((obj = prop_object_iterator_next(trans->iter)) != NULL) {
prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
if (strcmp(tract, "remove") == 0) if (strcmp(tract, "remove") == 0)
continue; continue;
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname); prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);

View File

@ -54,7 +54,7 @@ digraph transaction_dictionary {
state_notinst [style=filled,fillcolor="yellowgreen",label="not-installed"]; state_notinst [style=filled,fillcolor="yellowgreen",label="not-installed"];
state_unpacked [style=filled,fillcolor="yellowgreen",label="unpacked"]; state_unpacked [style=filled,fillcolor="yellowgreen",label="unpacked"];
dictionary -> trans_action [label="string"]; dictionary -> trans_action [label="string"];
trans_action [label="trans-action"]; trans_action [label="transaction"];
trans_action -> tract_inst [label="value"]; trans_action -> tract_inst [label="value"];
trans_action -> tract_up [label="value"]; trans_action -> tract_up [label="value"];
trans_action -> tract_cf [label="value"]; trans_action -> tract_cf [label="value"];

View File

@ -84,7 +84,7 @@ xbps_repository_pkg_replaces(prop_dictionary_t transd,
* as to be "removed". * as to be "removed".
*/ */
prop_dictionary_set_cstring_nocopy(instd, prop_dictionary_set_cstring_nocopy(instd,
"trans-action", "remove"); "transaction", "remove");
if (!xbps_add_obj_to_array(unsorted, instd)) { if (!xbps_add_obj_to_array(unsorted, instd)) {
prop_object_release(instd); prop_object_release(instd);
prop_object_iterator_release(iter); prop_object_iterator_release(iter);

View File

@ -189,7 +189,7 @@ unpack_archive(prop_dictionary_t pkg_repod,
prop_dictionary_get_bool(pkg_repod, "preserve", &preserve); prop_dictionary_get_bool(pkg_repod, "preserve", &preserve);
prop_dictionary_get_cstring_nocopy(pkg_repod, prop_dictionary_get_cstring_nocopy(pkg_repod,
"trans-action", &transact); "transaction", &transact);
assert(transact != NULL); assert(transact != NULL);
if (strcmp(transact, "update") == 0) if (strcmp(transact, "update") == 0)

View File

@ -297,7 +297,7 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
} }
/* Required pkgdep not installed */ /* Required pkgdep not installed */
prop_dictionary_set_cstring_nocopy(curpkgd, prop_dictionary_set_cstring_nocopy(curpkgd,
"trans-action", "install"); "transaction", "install");
xbps_dbg_printf_append("not installed.\n"); xbps_dbg_printf_append("not installed.\n");
} else { } else {
/* /*
@ -329,7 +329,7 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
"updating to `%s'...\n", "updating to `%s'...\n",
pkgver_q, repopkgver); pkgver_q, repopkgver);
prop_dictionary_set_cstring_nocopy(curpkgd, prop_dictionary_set_cstring_nocopy(curpkgd,
"trans-action", "update"); "transaction", "update");
} else if (rv == 1) { } else if (rv == 1) {
rv = 0; rv = 0;
if (state == XBPS_PKG_STATE_UNPACKED) { if (state == XBPS_PKG_STATE_UNPACKED) {
@ -339,7 +339,7 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
* mark pkg to be configured. * mark pkg to be configured.
*/ */
prop_dictionary_set_cstring_nocopy( prop_dictionary_set_cstring_nocopy(
curpkgd, "trans-action", curpkgd, "transaction",
"configure"); "configure");
xbps_dbg_printf_append("installed `%s'" xbps_dbg_printf_append("installed `%s'"
", but needs to be configured...\n", ", but needs to be configured...\n",

View File

@ -168,10 +168,10 @@ repository_find_pkg(const char *pattern, const char *reason)
goto out; goto out;
/* /*
* Set trans-action obj in pkg dictionary to "install" or "update". * Set transaction obj in pkg dictionary to "install" or "update".
*/ */
if (!prop_dictionary_set_cstring_nocopy(origin_pkgrd, if (!prop_dictionary_set_cstring_nocopy(origin_pkgrd,
"trans-action", reason)) { "transaction", reason)) {
rv = EINVAL; rv = EINVAL;
goto out; goto out;
} }

View File

@ -114,7 +114,7 @@ compute_transaction_sizes(void)
return EINVAL; return EINVAL;
while ((obj = prop_object_iterator_next(iter)) != NULL) { while ((obj = prop_object_iterator_next(iter)) != NULL) {
prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract);
/* /*
* Skip pkgs that need to be configured. * Skip pkgs that need to be configured.
*/ */