Bug 51478 - /etc/sgml/sgml-docbook.cat symlink is wrong
/etc/sgml/sgml-docbook.cat symlink is wrong
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: docbook-utils (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-10 16:09 EDT by Peter Bowen
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-05 13:05:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Non-working docbook file (148 bytes, text/plain)
2001-08-11 10:28 EDT, Peter Bowen
no flags Details

  None (edit)
Description Peter Bowen 2001-08-10 16:09:00 EDT
The post install script for all the docbook-dtd packages create the
/etc/sgml/sgml-docbook.cat symlink to their catalog, if it doesn't already
exist.  This creates a problem because jade can then only find one dtd,
instead of all that are installed.  It should instead have a permenant
symlink for /etc/sgml/sgml-docbook.cat to /etc/sgml/catalog, which includes
all the other catalogs.
Comment 1 Tim Waugh 2001-08-10 18:00:31 EDT
But jade's default catalog is /etc/sgml/catalog.  The symlink is 'the latest 
docbook version installed', and is there for convenience.  If you know that 
you are using the latest docbook version, and you don't want jade to search 
_all_ the catalogs, you can point it at the symlink.
Comment 2 Sean Dilda 2001-08-10 19:22:52 EDT
It documents that it uses /etc/sgml/catalog, but experimentation shows that it
uses /etc/sgml/sgml-docbook.cat when running commands like db2ps
Comment 3 Tim Waugh 2001-08-11 08:41:47 EDT
Please show me the steps to reproduce the problem; I don't see it.  Thanks.
Comment 4 Peter Bowen 2001-08-11 10:27:01 EDT
Traced down the problem - it looks like it should be actually filed against
docbook-utils.  It only occurs when using a doctype that isn't standard docbook,
such as the GNOME PNG Variant V1.0 that dcm wrote.  

To test this, and see the broken behaviour:
Get the gnome-doc-tools-2-0 rpm from http://people.redhat.com/dcm/ and install
it.  Then try to do db2ps on the attached docbook file.  

It will fail because /usr/share/sgml/docbook/frontends/docbook is trying to find
/etc/sgml/sgml-docbook-1.0.cat.  If this file doesn't exist, the fallback is to
use /etc/sgml/sgml-docbook.cat which doesn't know about the doctype either.

I imagine that this was done so that documents without any doctype at all could
be compiled/converted, but it breaks the GNOME doc stuff (and anyone else with a
custom doctype)
Comment 5 Peter Bowen 2001-08-11 10:28:29 EDT
Created attachment 27396 [details]
Non-working docbook file
Comment 6 Tim Waugh 2001-08-11 10:41:01 EDT
Thanks.  In that case it should fall back to /etc/sgml/catalog as you 
suggested.
Comment 7 Tim Waugh 2001-08-13 06:08:47 EDT
Come to think of it, the docbook-utils way of handling this is probably to 
create a new frontend.

cp /usr/share/sgml/docbook/utils-0.6.9/frontends/docbook{,-png}

and fix up docbook-png so that it figures out the version number needed or 
falls back to the symlink (i.e. change the regexp).  That will make it faster 
anyway.

I've mentioned this to the maintainer, so we'll see what he says.  But IMHO 
the png frontend is the way forward.
Comment 8 Tim Waugh 2001-08-17 07:50:53 EDT
The maintainer's view is that the DTD's FPI is wrong, and that you should have 
to use -c explicitly (just like the KDE people do, apparently).

If the DTD's FPI were derived using the algorithm that TDG mentions, this 
would work.  However, it isn't.  I think the correct one would be something 
like:

-//GNOME//DTD DocBook V3.1-Based PNG Variant V1.0//EN
Comment 9 David Mason 2001-08-17 10:09:11 EDT
Well it is too late to change the FPI now - this is in use throughout the GNOME
project. I have been pleading with people to start using DB 4.1 since it handles
png's fine. I don't know any other way to handle this in my gnome-doc-tools
package - we have to use -c
Comment 10 Peter Bowen 2001-08-17 10:33:09 EDT
I am still unclear as to why the fallback isn't /etc/sgml/catalog.  It seems
from the code that it tried sgml-docbook-{verison}.cat, then tried
sgml-docbook.cat.  It there an advantage to falling back to
/etc/sgml/sgml-docbook.cat?
Comment 11 Tim Waugh 2001-08-17 10:40:10 EDT
Eric Bischoff claims that there are 'various technical problems' with falling 
back to /etc/sgml/catalog, although he hasn't explained exactly what they are.
Comment 12 David Mason 2001-08-17 10:45:31 EDT
urrrgh! (sorry, blatent waste of bugzilla space)
Comment 13 Tim Waugh 2001-11-06 05:17:16 EST
Oh, I've thought of a technical problem: XML tools might not understand full 
SGML, and so pointing them to SGML DTDs is bad.  Here's the current 
docbook-utils docbook frontend code:

  centralized-catalog)
        SGML_VERSION=[hairy regexp that gets confused by PNG-variant]
        if [ -f ${SGML_CATALOGS_DIR}/${SGML_XML}-docbook-${SGML_VERSION}.cat ]
         then echo "[...]${SGML_XML}-docbook-${SGML_VERSION}.cat"
        else echo "[...]/${SGML_XML}-docbook.cat"
        fi
        ;;

If we change '${SGML_XML}-docbook.cat' to 'catalog', that's bad if SGML_XML is 
'xml' (i.e. it's DocBook XML).

So how about this:

elif [ "${SGML_XML}" != "sgml" ]
then echo "[...]/${SGML_XML}-docbook.cat"
else echo "[...]/catalog"
fi


Comment 14 Tim Waugh 2002-02-06 11:40:21 EST
Fixed in 0.6.9-21.

Note You need to log in before you can comment on or make changes to this bug.