diff --git a/pisi/api.py b/pisi/api.py index 68de043a..48da7252 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -54,7 +54,8 @@ class Error(pisi.Error): def init(database = True, write = True, options = None, ui = None, comar = True, - stdout = None, stderr = None): + stdout = None, stderr = None, + comar_sockname = None): """Initialize PiSi subsystem""" # UI comes first @@ -92,6 +93,8 @@ def init(database = True, write = True, # TODO: this is definitely not dynamic beyond this point! ctx.comar = comar and not ctx.config.get_option('ignore_comar') + # This is for YALI, used in comariface.py:make_com() + ctx.comar_sockname = comar_sockname # initialize repository databases ctx.database = database diff --git a/pisi/comariface.py b/pisi/comariface.py index 408c74ab..847ee20d 100644 --- a/pisi/comariface.py +++ b/pisi/comariface.py @@ -27,7 +27,10 @@ class Error(pisi.Error): def make_com(): try: import comar - comard = comar.Link() + if ctx.comar_sockname: + comard = comar.Link() + else: + comard = comar.Link(sockname=ctx.comar_sockname) return comard except ImportError: raise Error(_("COMAR: comard not fully installed")) diff --git a/pisi/context.py b/pisi/context.py index 71ec41de..d19df3d8 100644 --- a/pisi/context.py +++ b/pisi/context.py @@ -44,6 +44,7 @@ repodb = None invidx = None comar = None +comar_sockname = None initialized = False