* fix: init api for partial rebuild-db
This commit is contained in:
@@ -652,14 +652,13 @@ If package specs are given, they should be the names of package dirs under /var/
|
|||||||
name = ("rebuild-db", "rdb")
|
name = ("rebuild-db", "rdb")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
self.init(database=False)
|
|
||||||
|
|
||||||
if self.args:
|
if self.args:
|
||||||
|
self.init(database=True)
|
||||||
for package_fn in self.args:
|
for package_fn in self.args:
|
||||||
pisi.api.resurrect_package(package_fn)
|
pisi.api.resurrect_package(package_fn)
|
||||||
else:
|
else:
|
||||||
#FIXME: Confirm icin init, unlink icin finalize, rebuild_db icin init lazim :)
|
self.init(database=False)
|
||||||
if ctx.ui.confirm(_('Rebuild PISI databases?')):
|
if ctx.ui.confirm(_('Rebuild PISI databases?')):
|
||||||
self.finalize()
|
self.finalize()
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user