* don't go into upgrade_pisi in upgrade_base, should make it possible
to rebuild-db at the end of upgrades
This commit is contained in:
+3
-4
@@ -48,7 +48,7 @@ class PisiUpgradeException(pisi.Exception):
|
||||
pisi.Exception.__init__(self, _("Upgrading PISI requires database rebuild and restart"))
|
||||
|
||||
def upgrade_pisi():
|
||||
ctx.ui.warning(_("PISI package has been upgraded. Rebuilding database and restarting."))
|
||||
ctx.ui.warning(_("PISI package has been upgraded. Rebuilding database."))
|
||||
pisi.api.finalize()
|
||||
os.system('pisi rebuild-db -y')
|
||||
#reload(pisi)
|
||||
@@ -56,7 +56,6 @@ def upgrade_pisi():
|
||||
#pisi.api.rebuild_db()
|
||||
raise PisiUpgradeException()
|
||||
|
||||
|
||||
# high level operations
|
||||
|
||||
def install(packages, reinstall = False):
|
||||
@@ -323,7 +322,7 @@ in the respective order to satisfy dependencies:
|
||||
for x in order:
|
||||
atomicoperations.install_single_name(x)
|
||||
|
||||
if 'pisi' in order and ctx.installdb.is_installed('pisi'):
|
||||
if not bypass_safety and 'pisi' in order and ctx.installdb.is_installed('pisi'):
|
||||
upgrade_pisi()
|
||||
|
||||
def plan_install_pkg_names(A):
|
||||
@@ -441,7 +440,7 @@ def upgrade_pkg_names(A = [], bypass_safety = False):
|
||||
install_op = atomicoperations.Install(path)
|
||||
install_op.install(True)
|
||||
|
||||
if 'pisi' in order:
|
||||
if not bypass_safety and 'pisi' in order:
|
||||
upgrade_pisi()
|
||||
|
||||
def plan_upgrade(A, ignore_build = False):
|
||||
|
||||
Reference in New Issue
Block a user