summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-09 21:16:00 +0100
committerAurelien Foret <aurelien@archlinux.org>2006-01-09 21:16:00 +0100
commitfd6ce1f4cb8011756f7c07d28c5e06ce0be1acb7 (patch)
tree1e735f251fdfb3413085862bf77f851ec0ce3eb0 /lib/libalpm/add.c
parent45a7e57f6c4c375d6b8716e2dfc15da592ec147b (diff)
downloadpacman-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/add.c')
-rw-r--r--lib/libalpm/add.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index d683877d..e2276695 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -71,7 +71,7 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
*/
if(strchr(name, '|')) {
char *str, *ptr, *p;
- dummy = pkg_new();
+ dummy = pkg_new(NULL, NULL);
if(dummy == NULL) {
pm_errno = PM_ERR_MEMORY;
goto error;
@@ -339,10 +339,8 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
_alpm_log(PM_LOG_FLOW1, "upgrading package %s-%s", info->name, info->version);
/* we'll need to save some record for backup checks later */
- oldpkg = pkg_new();
+ oldpkg = pkg_new(local->name, local->version);
if(oldpkg) {
- strncpy(oldpkg->name, local->name, PKG_NAME_LEN);
- strncpy(oldpkg->version, local->version, PKG_VERSION_LEN);
if(!(local->infolevel & INFRQ_FILES)) {
char name[PKG_FULLNAME_LEN];
snprintf(name, PKG_FULLNAME_LEN, "%s-%s", local->name, local->version);