diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-04-20 21:39:41 +0200 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-04-20 21:39:41 +0200 |
commit | 3ad6393baf3a7c2d8182d871551ba8a24e950a4d (patch) | |
tree | f9f13c4abd2441dcb6131ed869189f10fd75e1a1 /lib/libalpm | |
parent | f5cbbb2483d7c56baa109adaffd8b75b1edde59e (diff) | |
download | pacman-3ad6393baf3a7c2d8182d871551ba8a24e950a4d.tar.gz pacman-3ad6393baf3a7c2d8182d871551ba8a24e950a4d.tar.xz |
bypass trans_prepare() if there is no target
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/trans.c | 5 |
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: |