Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-01 17:16:56 -0500
committerDan McGee <dan@archlinux.org>2011-09-02 21:45:03 -0500
commit37da18aee8d925ee5cd9f526f2c61d07e9db5b66 (patch)
tree3ed740826f4463c8779080b07b57adbde1fe5c3b /lib/libalpm/add.c
parentd88e524e7c6e902dcf1c0afed52def0d8b430b25 (diff)
Move all callbacks up to the handle level
This was just disgusting before, unnecessary to limit these to only usage in a transaction. Still a lot of more room for cleanup but we'll start by attaching them to the handle rather than the transaction we may or may not even want to use these callbacks. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index cb8551e8..96272a25 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -473,7 +473,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
goto cleanup;
}
- EVENT(trans, ALPM_TRANS_EVT_UPGRADE_START, newpkg, local);
+ EVENT(handle, ALPM_TRANS_EVT_UPGRADE_START, newpkg, local);
_alpm_log(handle, ALPM_LOG_DEBUG, "upgrading package %s-%s\n",
newpkg->name, newpkg->version);
@@ -488,7 +488,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
} else {
is_upgrade = 0;
- EVENT(trans, ALPM_TRANS_EVT_ADD_START, newpkg, NULL);
+ EVENT(handle, ALPM_TRANS_EVT_ADD_START, newpkg, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s\n",
newpkg->name, newpkg->version);
@@ -567,10 +567,10 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
if(is_upgrade) {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_UPGRADE_START,
newpkg->name, 0, pkg_count, pkg_current);
} else {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_ADD_START,
newpkg->name, 0, pkg_count, pkg_current);
}
@@ -594,10 +594,10 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
if(is_upgrade) {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_UPGRADE_START,
newpkg->name, percent, pkg_count, pkg_current);
} else {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_ADD_START,
newpkg->name, percent, pkg_count, pkg_current);
}
@@ -649,10 +649,10 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
if(is_upgrade) {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_UPGRADE_START,
newpkg->name, 100, pkg_count, pkg_current);
} else {
- PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
+ PROGRESS(handle, ALPM_TRANS_PROGRESS_ADD_START,
newpkg->name, 100, pkg_count, pkg_current);
}
@@ -669,9 +669,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
if(is_upgrade) {
- EVENT(trans, ALPM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
+ EVENT(handle, ALPM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
} else {
- EVENT(trans, ALPM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
+ EVENT(handle, ALPM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
}
cleanup: