diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-07 16:13:58 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-13 19:41:16 -0500 |
commit | 52bffd2457b7ba3b6fb08d3aa959ea0b53a45dc8 (patch) | |
tree | f426280f674b10c2175bd99feba8ec0e42d7b0de /lib/libalpm/trans.c | |
parent | e2aa952689da8763d534d1c19310eb97009f4f76 (diff) | |
download | pacman-52bffd2457b7ba3b6fb08d3aa959ea0b53a45dc8.tar.xz |
Switch all logging to use handle directly
This is the last user of our global handle object. Once again the diff
is large but the functional changes are not.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r-- | lib/libalpm/trans.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 564b06eb..a95280c7 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -125,7 +125,7 @@ int SYMEXPORT alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags, /* check database version */ db_version = _alpm_db_version(handle->db_local); if(db_version < required_db_version) { - _alpm_log(PM_LOG_ERROR, + _alpm_log(handle, PM_LOG_ERROR, _("%s database version is too old\n"), handle->db_local->treename); remove_lock(handle); _alpm_trans_free(trans); @@ -283,7 +283,7 @@ int SYMEXPORT alpm_trans_release(pmhandle_t *handle) /* unlock db */ if(!nolock_flag) { if(remove_lock(handle)) { - _alpm_log(PM_LOG_WARNING, _("could not remove lock file %s\n"), + _alpm_log(handle, PM_LOG_WARNING, _("could not remove lock file %s\n"), alpm_option_get_lockfile(handle)); alpm_logaction(handle, "warning: could not remove lock file %s\n", alpm_option_get_lockfile(handle)); @@ -350,7 +350,7 @@ int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn, if(access(installfn, R_OK)) { /* not found */ - _alpm_log(PM_LOG_DEBUG, "scriptlet '%s' not found\n", installfn); + _alpm_log(handle, PM_LOG_DEBUG, "scriptlet '%s' not found\n", installfn); return 0; } @@ -361,7 +361,7 @@ int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn, } snprintf(tmpdir, PATH_MAX, "%stmp/alpm_XXXXXX", handle->root); if(mkdtemp(tmpdir) == NULL) { - _alpm_log(PM_LOG_ERROR, _("could not create temp directory\n")); + _alpm_log(handle, PM_LOG_ERROR, _("could not create temp directory\n")); return 1; } else { clean_tmpdir = 1; @@ -375,7 +375,7 @@ int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn, } } else { if(_alpm_copyfile(installfn, scriptfn)) { - _alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), scriptfn, strerror(errno)); + _alpm_log(handle, PM_LOG_ERROR, _("could not copy tempfile to %s (%s)\n"), scriptfn, strerror(errno)); retval = 1; } } @@ -399,13 +399,13 @@ int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn, scriptpath, script, ver); } - _alpm_log(PM_LOG_DEBUG, "executing \"%s\"\n", cmdline); + _alpm_log(handle, PM_LOG_DEBUG, "executing \"%s\"\n", cmdline); retval = _alpm_run_chroot(handle, "/bin/sh", argv); cleanup: if(clean_tmpdir && _alpm_rmrf(tmpdir)) { - _alpm_log(PM_LOG_WARNING, _("could not remove tmpdir %s\n"), tmpdir); + _alpm_log(handle, PM_LOG_WARNING, _("could not remove tmpdir %s\n"), tmpdir); } return retval; |