Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index d38eed7b..0e0bd899 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -108,13 +108,13 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
return(0);
}
+ _alpm_log(PM_LOG_FLOW2, "loading target %s", name);
+
if(stat(name, &buf)) {
pm_errno = PM_ERR_NOT_A_FILE;
goto error;
}
- _alpm_log(PM_LOG_FLOW2, "loading target %s", name);
-
if(pkg_splitname(name, pkgname, pkgver) == -1) {
pm_errno = PM_ERR_PKG_INVALID_NAME;
goto error;
@@ -256,10 +256,7 @@ int add_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data)
}
/* copy the file skiplist into the transaction */
- for(lp = skiplist; lp; lp = lp->next) {
- trans->skiplist = pm_list_add(trans->skiplist, lp->data);
- }
- FREELISTPTR(skiplist);
+ trans->skiplist = skiplist;
EVENT(trans, PM_TRANS_EVT_FILECONFLICTS_DONE, NULL, NULL);
}
@@ -646,18 +643,17 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
/* use the first one */
depinfo = db_get_pkgfromcache(db, ((pmpkg_t *)provides->data)->name);
FREELISTPTR(provides);
- if(depinfo == NULL) {
- /* wtf */
- continue;
- }
- } else {
+ }
+ if(depinfo == NULL) {
+ /* wtf */
continue;
}
}
depinfo->requiredby = pm_list_add(depinfo->requiredby, strdup(info->name));
_alpm_log(PM_LOG_DEBUG, "updating 'requiredby' field for package %s", depinfo->name);
if(db_write(db, depinfo, INFRQ_DEPENDS)) {
- _alpm_log(PM_LOG_ERROR, "could not update 'requiredby' database entry %s/%s-%s", db->treename, depinfo->name, depinfo->version);
+ _alpm_log(PM_LOG_ERROR, "could not update 'requiredby' database entry %s-%s",
+ depinfo->name, depinfo->version);
}
}