summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-24 21:49:18 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-24 21:49:18 +0000
commitff16088b276eb507c7f8c90941e24977de9000ba (patch)
treefd5a8bf4f3bee8d7d835c5cf5ca2ce1a1345488c
parent4a5c60725860f0eef5c8a38545332213385f3f13 (diff)
fix: one can't add a package twice in transaction targets list
-rw-r--r--lib/libalpm/add.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 307cf284..f80fe9f0 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -100,6 +100,9 @@ int add_loadtarget(pmdb_t *db, pmtrans_t *trans, char *name)
_alpm_log(PM_LOG_WARNING, "replacing older version of %s in target list", pkg->name);
FREEPKG(j->data);
j->data = info;
+ } else {
+ pm_errno = PM_ERR_TRANS_DUP_TARGET;
+ goto error;
}
}
}