Kaydet (Commit) 3dedc15e authored tarafından Your Name's avatar Your Name

inary enable-disable repo actions dont need cache update

üst 37628ed5
......@@ -13,6 +13,8 @@
#
import inary.cli.command as command
from inary.operations import repository
import inary.db
# Gettext Library
import gettext
......@@ -32,4 +34,4 @@ class InitNothing(command.PackageOp, metaclass=command.autocommand):
pass
def run(self):
pass
repodb=inary.db.repodb.RepoDB()
......@@ -154,7 +154,7 @@ class RepoDB(lazydb.LazyDB):
def __init__(self):
lazydb.LazyDB.__init__(
self,
cacheable=False,
cacheable=True,
cachedir=ctx.config.packages_dir())
def init(self):
......
......@@ -45,8 +45,6 @@ def add_repo(name, indexuri, at=None):
else:
repo = inary.db.repodb.Repo(inary.uri.URI(indexuri))
repodb.add_repo(name, repo, at=at)
ctx.ui.info(_('Flushing database caches...'), verbose=True)
inary.db.flush_caches()
ctx.ui.info(_('Repository \"{}\" added to system.').format(name))
......@@ -76,8 +74,6 @@ def set_repo_activity(name, active):
repodb.activate_repo(name)
else:
repodb.deactivate_repo(name)
ctx.ui.info(_('Regenerating database caches...'), verbose=True)
inary.db.regenerate_caches()
@util.locked
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment