diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-03-17 12:04:39 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-03-17 12:04:39 +0200 |
commit | ed78cef2c3e14df29d95b476f00d51203fbe098e (patch) | |
tree | 8b998c19087e25a7a1cd624fe25963edad20e12a /lib/rpminstall.c | |
parent | 874f6849d9f5f71b3815e358c6c5a049f6a4fa66 (diff) | |
download | librpm-tizen-ed78cef2c3e14df29d95b476f00d51203fbe098e.tar.gz librpm-tizen-ed78cef2c3e14df29d95b476f00d51203fbe098e.tar.bz2 librpm-tizen-ed78cef2c3e14df29d95b476f00d51203fbe098e.zip |
Remove support for automatic rollback on failure
- doing this reliably from rpm is simply not possible as there's no way
to undo script actions, might as well not pretend we can
- for a feature that's not generally usable it complicates mainline code
way too much
Diffstat (limited to 'lib/rpminstall.c')
-rw-r--r-- | lib/rpminstall.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c index df923b423..13ec4978b 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -856,7 +856,6 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) int numAdded; int numRemoved; rpmps ps; - int _unsafe_rollbacks = 0; rpmtransFlags transFlags = ia->transFlags; if (argv != NULL && *argv != NULL) { @@ -864,8 +863,6 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) goto exit; } - _unsafe_rollbacks = rpmExpandNumeric("%{?_unsafe_rollbacks}"); - vsflags = rpmExpandNumeric("%{?_vsflags_erase}"); if (ia->qva_flags & VERIFY_DIGEST) vsflags |= _RPMVSF_NODIGESTS; @@ -878,11 +875,6 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) (void) rpmtsSetFlags(ts, transFlags); - /* Make the transaction a rollback transaction. In a rollback - * a best effort is what we want - */ - rpmtsSetType(ts, RPMTRANS_TYPE_ROLLBACK); - itids = IDTXload(ts, RPMTAG_INSTALLTID); if (itids != NULL) { ip = itids->idt; @@ -936,10 +928,6 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) if (thistid == 0 || thistid < ia->rbtid) break; - /* If we've reached the (configured) rollback goal, then we're done. */ - if (_unsafe_rollbacks && thistid <= _unsafe_rollbacks) - break; - rpmtsEmpty(ts); (void) rpmtsSetFlags(ts, transFlags); @@ -981,9 +969,6 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) numRemoved++; - if (_unsafe_rollbacks) - rpmcliPackagesTotal++; - if (!(ia->installInterfaceFlags & ifmask)) { ia->installInterfaceFlags |= INSTALL_ERASE; (void) rpmtsSetFlags(ts, (transFlags | RPMTRANS_FLAG_REVERSE)); |