diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-06-11 08:19:08 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-06-11 08:20:32 +0300 |
commit | 33197fd4b19eeed5e7623ec1af62595449fc710b (patch) | |
tree | 475e71a2c63bfc50f01a611058a1d00eff2a16f7 | |
parent | 89be57ad9239c9ada0cba94a5003876b456d46bf (diff) | |
download | librpm-tizen-33197fd4b19eeed5e7623ec1af62595449fc710b.tar.gz librpm-tizen-33197fd4b19eeed5e7623ec1af62595449fc710b.tar.bz2 librpm-tizen-33197fd4b19eeed5e7623ec1af62595449fc710b.zip |
Dont bother with selinux contexts in test transactions
- initializing contexts isn't exactly cheap, and test transactions
have no use for them
-rw-r--r-- | lib/transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 3e14d684b..9881426be 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1182,8 +1182,8 @@ static int rpmtsSetup(rpmts ts, rpmprobFilterFlags ignoreSet) if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB) (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | _noTransScripts | _noTransTriggers)); - /* if SELinux isn't enabled or init fails, don't bother... */ - if (!rpmtsSELinuxEnabled(ts)) { + /* if SELinux isn't enabled, init fails or test run, don't bother... */ + if (!rpmtsSELinuxEnabled(ts) || (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)) { rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_NOCONTEXTS)); } |