index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-30 22:32:43 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-30 22:32:43 +0000 |
commit | 4d21e4f721077387734c8f77017e0dba8a95a14b (patch) | |
tree | d47779158c1dfaacd26cb6bdaedfc109c1eb9f5d /lib/libalpm/trans.c | |
parent | b009c5bafa63581a0c590a8c1a1d8dafd5e7654a (diff) |
-rw-r--r-- | lib/libalpm/trans.c | 14 |
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 7bd37e1f..6e278cd7 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -61,7 +61,12 @@ void trans_free(pmtrans_t *trans) } FREELIST(trans->targets); - FREELISTPKGS(trans->packages); + /* ORE - ugly */ + if(trans->type == PM_TRANS_TYPE_SYNC) { + FREELISTPTR(trans->packages); + } else { + FREELISTPKGS(trans->packages); + } free(trans); } @@ -109,9 +114,14 @@ int trans_addtarget(pmtrans_t *trans, char *target) return(-1); } break; + case PM_TRANS_TYPE_SYNC: + if(sync_addtarget(handle->db_local, handle->dbs_sync, trans, target) == -1) { + /* pm_errno is set by add_loadtarget() */ + return(-1); + } + break; } trans->targets = pm_list_add(trans->targets, strdup(target)); - trans->state = STATE_INITIALIZED; return(0); } |