[elbe-devel] [PATCH 2/2] Fix xml catalog

Philipp Arras philipp.arras at linutronix.de
Wed Jun 7 17:28:10 CEST 2017


Hi John,
 
thanks for your comments!
 
 - The file separator can be obtained by running os.pathsep. On linux
 it is the standard ":".
 
 - You pointed out the problem with paths when running elbe from the
 source tree in contrast to running it as a installed package.
   - If run from source tree, we have to add the path to the XML
 catalog by hand (as it is done in `directories.py`).
   - If installed, Elbe will find `/etc/xml/elbe-common.xml` which
 redirects the xml request to `/usr/share/...` and no manual
 redirection is necessary (see `directories.py`).
 
 - I fixed the links to the catalogs. It should be working now.
 
Cheers
Philipp


On Wed, 07 Jun 2017 07:04:21 +0200
John Ogness <john.ogness at linutronix.de> wrote:

> Sorry, the patch snippet from my last email was incorrect. This is
> what it should have looked like.
> 
> On 2017-06-07, John Ogness <john.ogness at linutronix.de> wrote:
> > But the second problem is that this change causes elbe to always
> > look for the catalog.xml relative to the elbe binary. This works
> > when elbe is run from the source directory but does not when
> > installed. I did this change to the file _instead_ of your change
> > and it worked for me:
> >
> --- a/elbepack/directories.py
> +++ b/elbepack/directories.py
> @@ -34,9 +34,10 @@ def init_directories(elbe_relpath):
>  
>      if elbe_exe.startswith ("/usr/bin/"):
>          examples_dir = "/usr/share/doc/elbe-doc/examples"
> +        os.environ['XML_CATALOG_FILES'] =
> "/usr/share/xml/elbe-common/catalog.ml" else:
>          examples_dir = os.path.join (elbe_dir, "examples")
> -
> +        os.environ['XML_CATALOG_FILES'] = elbe_dir +
> "/schema/catalog.xml" 
>  def get_cmdlist():
>      return [ x for _, x, _ in
>      iter_modules(elbepack.commands.__path__) ]
> 
> John Ogness





More information about the elbe-devel mailing list