diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-26 16:14:52 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-03-26 17:11:12 +0200 |
commit | 98cfe652077e311d62c6f26fa3c5b6907f013ace (patch) | |
tree | ebdbd8ed7689a55b7bd167229940cb3b3877f86f /lib/rpminstall.c | |
parent | 42fa7b7d4f0521da4e4c09b7fdcc8789412ff164 (diff) | |
download | librpm-tizen-98cfe652077e311d62c6f26fa3c5b6907f013ace.tar.gz librpm-tizen-98cfe652077e311d62c6f26fa3c5b6907f013ace.tar.bz2 librpm-tizen-98cfe652077e311d62c6f26fa3c5b6907f013ace.zip |
Simplify rpmcliTransaction() a bit
- No need for separate the install and erase cases here for problem
filter flags: we only check disk space for added packages so this
is just a no-op anyway
- Also no need to fiddle with eflags for ordering, we always want
ordering unless --noorder specified
Diffstat (limited to 'lib/rpminstall.c')
-rw-r--r-- | lib/rpminstall.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 8a54c9959..ec3fba53d 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -259,7 +259,7 @@ static int rpmcliTransaction(rpmts ts, struct rpmInstallArguments_s * ia, ps = rpmpsFree(ps); } - if ((eflags? 1 : (!stop)) && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { + if (!stop && !(ia->installInterfaceFlags & INSTALL_NOORDER)) { if (rpmtsOrder(ts)) { rc = numPackages; stop = 1; @@ -267,16 +267,10 @@ static int rpmcliTransaction(rpmts ts, struct rpmInstallArguments_s * ia, } if (numPackages && !stop) { - - if (eflags) { - rpmlog(RPMLOG_DEBUG, "erasing packages\n"); - rpmtsClean(ts); - rc = rpmtsRun(ts, NULL, ia->probFilter & (RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES)); - } else { - rpmlog(RPMLOG_DEBUG, "installing binary packages\n"); - rpmtsClean(ts); - rc = rpmtsRun(ts, NULL, ia->probFilter); - } + rpmlog(RPMLOG_DEBUG, eflags ? "erasing packages\n" : + "installing binary packages\n"); + rpmtsClean(ts); + rc = rpmtsRun(ts, NULL, ia->probFilter); ps = rpmtsProblems(ts); |