diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 19:42:44 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 19:42:44 +0100 |
commit | 86e5c8bc0649a6df814bdff850a787826612f366 (patch) | |
tree | 0c81099af96848c8c87f6a305fea2f64cd0e020d /lib/libalpm/sync.c | |
parent | e405204915600340180cef61471471929fb0c275 (diff) | |
download | pacman-86e5c8bc0649a6df814bdff850a787826612f366.tar.gz pacman-86e5c8bc0649a6df814bdff850a787826612f366.tar.xz |
sync_commit can now return conflicting files with a trans_prepare like data structure (patch from VMiklos <vmiklos@frugalware.org>)
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r-- | lib/libalpm/sync.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index fc962a36..fe655b8b 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -616,10 +616,9 @@ error: return(-1); } -int sync_commit(pmtrans_t *trans, pmdb_t *db_local) +int sync_commit(pmtrans_t *trans, pmdb_t *db_local, PMList **data) { PMList *i; - PMList *data; pmtrans_t *tr = NULL; int replaces = 0; int removal = 0; @@ -665,13 +664,13 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local) } if(replaces+removal != 0) { _alpm_log(PM_LOG_FLOW1, "removing conflicting and to-be-replaced packages"); - if(trans_prepare(tr, &data) == -1) { + if(trans_prepare(tr, data) == -1) { _alpm_log(PM_LOG_ERROR, "could not prepare removal transaction"); goto error; } /* we want the frontend to be aware of commit details */ tr->cb_event = trans->cb_event; - if(trans_commit(tr) == -1) { + if(trans_commit(tr, NULL) == -1) { _alpm_log(PM_LOG_ERROR, "could not commit removal transaction"); goto error; } @@ -709,13 +708,13 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local) spkg->reason = PM_PKG_REASON_EXPLICIT; } } - if(trans_prepare(tr, &data) == -1) { + if(trans_prepare(tr, data) == -1) { _alpm_log(PM_LOG_ERROR, "could not prepare transaction"); goto error; } /* we want the frontend to be aware of commit details */ tr->cb_event = trans->cb_event; - if(trans_commit(tr) == -1) { + if(trans_commit(tr, NULL) == -1) { _alpm_log(PM_LOG_ERROR, "could not commit transaction"); goto error; } |