init comar with sockname parameter (a feature for YALI).
This commit is contained in:
+4
-1
@@ -54,7 +54,8 @@ class Error(pisi.Error):
|
|||||||
|
|
||||||
def init(database = True, write = True,
|
def init(database = True, write = True,
|
||||||
options = None, ui = None, comar = True,
|
options = None, ui = None, comar = True,
|
||||||
stdout = None, stderr = None):
|
stdout = None, stderr = None,
|
||||||
|
comar_sockname = None):
|
||||||
"""Initialize PiSi subsystem"""
|
"""Initialize PiSi subsystem"""
|
||||||
|
|
||||||
# UI comes first
|
# UI comes first
|
||||||
@@ -92,6 +93,8 @@ def init(database = True, write = True,
|
|||||||
|
|
||||||
# TODO: this is definitely not dynamic beyond this point!
|
# TODO: this is definitely not dynamic beyond this point!
|
||||||
ctx.comar = comar and not ctx.config.get_option('ignore_comar')
|
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
|
# initialize repository databases
|
||||||
ctx.database = database
|
ctx.database = database
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ class Error(pisi.Error):
|
|||||||
def make_com():
|
def make_com():
|
||||||
try:
|
try:
|
||||||
import comar
|
import comar
|
||||||
|
if ctx.comar_sockname:
|
||||||
comard = comar.Link()
|
comard = comar.Link()
|
||||||
|
else:
|
||||||
|
comard = comar.Link(sockname=ctx.comar_sockname)
|
||||||
return comard
|
return comard
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise Error(_("COMAR: comard not fully installed"))
|
raise Error(_("COMAR: comard not fully installed"))
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ repodb = None
|
|||||||
invidx = None
|
invidx = None
|
||||||
|
|
||||||
comar = None
|
comar = None
|
||||||
|
comar_sockname = None
|
||||||
|
|
||||||
initialized = False
|
initialized = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user