WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm: xen-api: Install create.dtd in SHARED

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: xen-api: Install create.dtd in SHAREDIR
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Jun 2009 10:25:35 -0700
Delivery-date: Thu, 04 Jun 2009 10:27:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244108293 -3600
# Node ID a3125a83e40bd7cc68ec64ca89eb69be287d8e6f
# Parent  f569292aacc59dbbd89b3d28248fcc0e1275e4f1
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

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 tools/python/Makefile                |    5 +++--
 tools/python/xen/xm/xenapi_create.py |    4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r f569292aacc5 -r a3125a83e40b tools/python/Makefile
--- a/tools/python/Makefile     Thu Jun 04 10:37:39 2009 +0100
+++ b/tools/python/Makefile     Thu Jun 04 10:38:13 2009 +0100
@@ -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 \
diff -r f569292aacc5 -r a3125a83e40b tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Thu Jun 04 10:37:39 2009 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Thu Jun 04 10:38:13 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: xen-api: Install create.dtd in SHAREDIR, Xen patchbot-unstable <=