summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-20 19:39:41 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-20 19:39:41 +0000
commit3ad6393baf3a7c2d8182d871551ba8a24e950a4d (patch)
treef9f13c4abd2441dcb6131ed869189f10fd75e1a1 /lib/libalpm
parentf5cbbb2483d7c56baa109adaffd8b75b1edde59e (diff)
downloadpacman-3ad6393baf3a7c2d8182d871551ba8a24e950a4d.tar.xz
bypass trans_prepare() if there is no target
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/trans.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index c0eeb421..0a68a2bc 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -145,6 +145,11 @@ int trans_prepare(pmtrans_t *trans, PMList **data)
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ /* If there's nothing to do, return without complaining */
+ if(trans->packages == NULL) {
+ return(0);
+ }
+
switch(trans->type) {
case PM_TRANS_TYPE_ADD:
case PM_TRANS_TYPE_UPGRADE: