From f580227ec7035297964620d2cf2a21443bda3232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serdar=20Dalg=C4=B1=C3=A7?= Date: Thu, 31 Dec 2009 12:34:46 +0000 Subject: [PATCH] Do not give permission to takeback system to the initial state which is always `pardus-cd repository is updated.` . --- ChangeLog | 4 ++++ pisi/cli/history.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b8a462f..a2bf6061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-12-31 Serdar Dalgıç + * pisi/cli/history.py: Do not give permission to takeback system to + the initial state which is always `pardus-cd repository is updated.` . + 2009-12-21 Gökçen Eraslan * pisi/actionsapi/cmaketools.py: Change CMake build type to RelWithDebInfo to get faster KDE packages. diff --git a/pisi/cli/history.py b/pisi/cli/history.py index 23742833..cd929832 100644 --- a/pisi/cli/history.py +++ b/pisi/cli/history.py @@ -123,7 +123,10 @@ Lists previous operations.""") elif ctx.get_option('takeback'): opno = ctx.get_option('takeback') if opno != -1: - self.takeback(opno) + if opno == 1: + ctx.ui.error(_("You can not takeback your system to the initial state.")) + else: + self.takeback(opno) return self.redirect_output(self.print_history)