diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-09 21:16:00 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-09 21:16:00 +0100 |
commit | fd6ce1f4cb8011756f7c07d28c5e06ce0be1acb7 (patch) | |
tree | 1e735f251fdfb3413085862bf77f851ec0ce3eb0 /lib/libalpm/sync.c | |
parent | 45a7e57f6c4c375d6b8716e2dfc15da592ec147b (diff) | |
download | pacman-fd6ce1f4cb8011756f7c07d28c5e06ce0be1acb7.tar.gz pacman-fd6ce1f4cb8011756f7c07d28c5e06ce0be1acb7.tar.xz |
- merged pkg_new and pkg_dummy functions
- renamed _alpm_log_action to _alpm_logaction
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r-- | lib/libalpm/sync.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index ab1a0fdd..7908a484 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -161,7 +161,7 @@ int sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync) * the package to replace. */ pmsyncpkg_t *sync; - pmpkg_t *dummy = pkg_dummy(lpkg->name, NULL); + pmpkg_t *dummy = pkg_new(lpkg->name, NULL); if(dummy == NULL) { pm_errno = PM_ERR_MEMORY; goto error; @@ -227,7 +227,7 @@ int sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync) _alpm_log(PM_LOG_FLOW1, "%s-%s: ignoring package upgrade (%s)", local->name, local->version, spkg->version); } else { - pmpkg_t *dummy = pkg_dummy(local->name, local->version); + pmpkg_t *dummy = pkg_new(local->name, local->version); sync = sync_new(PM_SYNC_TYPE_UPGRADE, spkg, dummy); if(sync == NULL) { FREEPKG(dummy); @@ -311,12 +311,10 @@ int sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, char *n if(!find_pkginsync(spkg->name, trans->packages)) { pmpkg_t *dummy = NULL; if(local) { - dummy = pkg_new(); + dummy = pkg_new(local->name, local->version); if(dummy == NULL) { RET_ERR(PM_ERR_MEMORY, -1); } - STRNCPY(dummy->name, local->name, PKG_NAME_LEN); - STRNCPY(dummy->version, local->version, PKG_VERSION_LEN); } sync = sync_new(PM_SYNC_TYPE_UPGRADE, spkg, dummy); if(sync == NULL) { @@ -512,7 +510,7 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList ** for(l = trans->packages; l; l = l->next) { pmsyncpkg_t *s = l->data; if(!strcmp(s->pkg->name, miss->target)) { - pmpkg_t *q = pkg_new(); + pmpkg_t *q = pkg_new(NULL, NULL); STRNCPY(q->name, miss->depend.name, PKG_NAME_LEN); if(s->type == PM_SYNC_TYPE_REPLACE) { /* append to the replaces list */ |