|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [patch 2/9] xm: xen-api: Install create.dtd in SHAREDIR
* Install create.dtd in SHAREDIR
* Use SHAREDIR/create.dtd
* import os.path.join into xenapi_create.py,
it already seems to be used many times
Resolves the following error when using XenAPI:
$ xm create hvm.conf
Couldn't open resource '/usr/share/xen/create.dtd' at
/usr/share/xen/create.dtd:1:0
Cc: Dexuan Cui <dexuan.cui@xxxxxxxxx>,
Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
Index: xen-unstable.hg/tools/python/Makefile
===================================================================
--- xen-unstable.hg.orig/tools/python/Makefile 2009-06-03 09:41:34.000000000
+1000
+++ xen-unstable.hg/tools/python/Makefile 2009-06-03 09:56:44.000000000
+1000
@@ -22,6 +22,7 @@ genpath:
echo "BINDIR=\"$(BINDIR)\"" >> ${xenpath}
echo "LIBEXEC=\"$(LIBEXEC)\"" >> ${xenpath}
echo "LIBDIR=\"$(LIBDIR)\"" >> ${xenpath}
+ echo "SHAREDIR=\"$(SHAREDIR)\"" >> ${xenpath}
echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> ${xenpath}
echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> ${xenpath}
echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> ${xenpath}
@@ -70,8 +71,8 @@ install: install-messages install-dtd
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
install-dtd: all
- $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
- $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(DOCDIR)
+ $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)
+ $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(SHAREDIR)
install-messages: all
set -e; if which $(MSGFMT) >/dev/null ; then \
Index: xen-unstable.hg/tools/python/xen/xm/xenapi_create.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xm/xenapi_create.py 2009-06-03
09:41:34.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xm/xenapi_create.py 2009-06-03
10:21:54.000000000 +1000
@@ -26,10 +26,12 @@ from xen.xend.XendAPIConstants import XE
XEN_API_ON_CRASH_BEHAVIOUR
from xen.xm.opts import OptionError
from xen.util import xsconstants
+from xen.util.path import SHAREDIR
import xen.util.xsm.xsm as security
import sys
import os
+from os.path import join
import traceback
import re
@@ -75,7 +77,7 @@ class xenapi_create:
def __init__(self):
self.DEFAULT_STORAGE_REPOSITORY = get_default_SR()
- self.dtd = "/usr/share/xen/create.dtd"
+ self.dtd = join(SHAREDIR, "create.dtd")
def create(self, filename=None, document=None, skipdtd=False):
"""
--
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [patch 0/9] Xen API for pass-through, Simon Horman
- [Xen-devel] [patch 1/9] xend: pass-through: report attach errors from device model, Simon Horman
- [Xen-devel] [patch 2/9] xm: xen-api: Install create.dtd in SHAREDIR,
Simon Horman <=
- [Xen-devel] [patch 3/9] xm: xen-api, pass-through: Dont pass empty opts, Simon Horman
- [Xen-devel] [patch 4/9] xend: pass-through: prefix vslot with 0x in device configration, Simon Horman
- [Xen-devel] [patch 5/9] xm, xend: xen-api: DPCI.get_hotplug_slot() returns a decimal, Simon Horman
- [Xen-devel] [patch 6/9] xend: xen-api, pass-through: Add create_dpci_from_sxp(), Simon Horman
- [Xen-devel] [patch 7/9] xm: xen-api, pass-through: create: Use vslot for hotplug_slot, Simon Horman
- [Xen-devel] [patch 8/9] xend: pass-through: Use AUTO_PHP_SLOT as unknown vslot, Simon Horman
|
|
|
|
|