From 6ce81c4198f1051b89f1b9135222fd8bbcb5bbed Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Tue, 10 Jan 2012 20:50:54 -0500 Subject: [PATCH] Unset last-install-rev if we uninstall a module. --- kdesrc-build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kdesrc-build b/kdesrc-build index 2d370ca..2f8bcb4 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -3195,11 +3195,15 @@ EOF # We can optionally uninstall prior to installing # to weed out old unused files. if ($self->getOption('use-clean-install') && - $self->getPersistentOption('last-install-rev') && - !$self->buildSystem()->uninstallInternal(@makeInstallOpts)) + $self->getPersistentOption('last-install-rev')) { - warning ("\tUnable to uninstall r[$self] before installing the new build."); - warning ("\tContinuing anyways..."); + if (!$self->buildSystem()->uninstallInternal(@makeInstallOpts)) { + warning ("\tUnable to uninstall r[$self] before installing the new build."); + warning ("\tContinuing anyways..."); + } + else { + $self->unsetPersistentOption('last-install-rev'); + } } if (!$self->buildSystem()->installInternal(@makeInstallOpts))