* 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)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user