* fix: don't try to init db for just confirm
This commit is contained in:
@@ -651,7 +651,7 @@ If package specs are given, they should be the names of package dirs under /var/
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
self.init()
|
self.init(comar=False, database=False)
|
||||||
|
|
||||||
if self.args:
|
if self.args:
|
||||||
for package_fn in self.args:
|
for package_fn in self.args:
|
||||||
@@ -661,6 +661,7 @@ If package specs are given, they should be the names of package dirs under /var/
|
|||||||
if ctx.ui.confirm(_('Rebuild PISI databases?')):
|
if ctx.ui.confirm(_('Rebuild PISI databases?')):
|
||||||
self.finalize()
|
self.finalize()
|
||||||
import os
|
import os
|
||||||
|
#FIXME: how good is deleting *all* databases?
|
||||||
for db in os.listdir(ctx.config.db_dir()):
|
for db in os.listdir(ctx.config.db_dir()):
|
||||||
os.unlink(pisi.util.join_path(ctx.config.db_dir(), db))
|
os.unlink(pisi.util.join_path(ctx.config.db_dir(), db))
|
||||||
self.init(database=True)
|
self.init(database=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user