From ac511bddda2638fd3f20bb20a2ef432019d4726a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Tue, 9 May 2006 12:44:30 +0000 Subject: [PATCH] * the intention here is to automatically rebuild db when upgrading pisi package, i am committing the intended code, commented out, let's think about this for a very short while. i think it's just too difficult for the user to know when to run rebuild-db. an exception is thrown after rebuilding the db, because the interrupted command, whatever it was, may have to be invoked again. or better still, the application must restart itself somehow :/ or we can make better use of the interpreted nature of python (i'm still thinking like a c++ coder) --- pisi/operations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pisi/operations.py b/pisi/operations.py index 3ef4f1e0..0bea1ca2 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -426,6 +426,10 @@ def upgrade_pkg_names(A = [], bypass_safety = False): #if 'pisi' in order: # ctx.ui.warning(_("PISI package has been upgraded. You should run rebuild-db.")) + # pisi.api.finalize() + # reload(pisi) + # pisi.api.init() + # pisi.api.rebuild_db() # raise PisiUpgradeException() def plan_upgrade(A, ignore_build = False):