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) {
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))
continue;
print_package_line(pkgver, false);
@ -207,7 +207,7 @@ show_transaction_sizes(struct transaction *trans)
trans_inst = trans_up = trans_conf = trans_rm = false;
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) {
trans->inst_pkgcnt++;
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, "pkgver", &pkgver);
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, "preserve", &preserve);
/*
@ -535,7 +535,7 @@ exec_transaction(struct transaction *trans)
*/
printf("\n[3/3] Configuring\n");
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)
continue;
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_unpacked [style=filled,fillcolor="yellowgreen",label="unpacked"];
dictionary -> trans_action [label="string"];
trans_action [label="trans-action"];
trans_action [label="transaction"];
trans_action -> tract_inst [label="value"];
trans_action -> tract_up [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".
*/
prop_dictionary_set_cstring_nocopy(instd,
"trans-action", "remove");
"transaction", "remove");
if (!xbps_add_obj_to_array(unsorted, instd)) {
prop_object_release(instd);
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_cstring_nocopy(pkg_repod,
"trans-action", &transact);
"transaction", &transact);
assert(transact != NULL);
if (strcmp(transact, "update") == 0)

View File

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

View File

@ -168,10 +168,10 @@ repository_find_pkg(const char *pattern, const char *reason)
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,
"trans-action", reason)) {
"transaction", reason)) {
rv = EINVAL;
goto out;
}

View File

@ -114,7 +114,7 @@ compute_transaction_sizes(void)
return EINVAL;
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.
*/