After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636005 - xmlcatalog --sgml --del does not update SGML super catalog
xmlcatalog --sgml --del does not update SGML super catalog
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: catalog
2.7.7
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-28 20:19 UTC by Ville Skyttä
Modified: 2021-07-05 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ville Skyttä 2010-11-28 20:19:46 UTC
xmlcatalog --sgml is documented to "Uses SGML super catalogs for --add and --del options.".  This works as expected for --add:

# xmlcatalog --sgml --noout --add foo
# grep foo /etc/sgml/catalog 
CATALOG "foo"

...but it doesn't work as documented for --del:

# xmlcatalog --sgml --noout --del foo
No catalog entry specified to remove from
Usage : xmlcatalog [options] catalogfile entities...
        Parse the catalog file and query it for the entities
        --sgml : handle SGML Super catalogs for --add and --del
        --shell : run a shell allowing interactive queries
        --create : create a new catalog
        --add 'type' 'orig' 'replace' : add an XML entry
        --add 'entry' : add an SGML entry
        --del 'values' : remove values
        --noout: avoid dumping the result on stdout
                 used with --add or --del, it saves the catalog changes
                 and with --sgml it automatically updates the super catalog
        --no-super-update: do not update the SGML super catalog
        -v --verbose : provide debug informations
# grep foo /etc/sgml/catalog 
CATALOG "foo"

A workaround is to do "xmlcatalog --sgml --no-super-update --noout --del /etc/sgml/catalog foo" but I think (per the documentation) that plain "xmlcatalog --sgml --noout --del foo" should remove "foo" from the SGML super catalog.
Comment 1 ralf.habacker 2015-01-07 14:37:43 UTC
The mentioned workaround command line variant is not documented at the man pages, which is:

xmlcatalog [--sgml | --shell | --create | --del VALUE(S) | [ --add TYPE ORIG REPLACE  | --add FILENAME] | --noout | --no-super-update |[-v | --verbose]] {CATALOGFILE} {ENTITIES...}

So see which variants are possible I checked some related examples and tried by myself with the following result with version 2.9.2:

1. xml mode: 
1.1 query:        xmlcatalog {CATALOGFILE} {ENTITIES...}

1.2 data management
1.2.1 replace mode:
1.2.1.1 create:   xmlcatalog --noout --create {CATALOGFILE}
1.2.1.2 add:      xmlcatalog --noout --add TYPE ORIG REPLACE {CATALOGFILE}
1.2.1.3 remove:   xmlcatalog --noout --del {ORIG} | {REPLACE} {CATALOGFILE}
1.2.1.4 delete:   not supported

1.2.2 stdout mode (no overwrite)
1.2.2.1 create:   xmlcatalog --create {CATALOGFILE}
1.2.2.2 add:      xmlcatalog --add TYPE ORIG REPLACE {CATALOGFILE}
1.2.2.3 remove:   xmlcatalog --del {ORIG} | {REPLACE} {CATALOGFILE}
1.2.2.4 delete:   not supported

2. sgml mode
2.1 query:        not supported yet

2.2 data management
2.2.1 specific file mode:
2.2.1.1 create:   implicied by adding the first entry
2.2.1.2 add:      xmlcatalog --sgml --noout --add {CATALOGFILE} {KEY} [1]
2.2.1.3 remove:   xmlcatalog --sgml --noout --del {CATALOGFILE} {KEY} [1]
2.2.1.4 delete:   implicied by deleting the last entry

2.2.2 super catalog mode (etc/sgml/catalog):
2.2.2.1 create:   implicied by adding the first entry
2.2.2.2 add:      xmlcatalog --sgml --noout --add {KEY}
2.2.2.3 remove:   not supported yet (workaround see 2.2.1.3)
2.1.2.4 delete:   implicied by deleting the last entry

3. shell mode
   not evaluated here

[1] --no-super-update is not required here

Looks that the man page need some rework.

The initial requested variant is 2.2.2.3 and the above mentioned workaround is 2.2.1.3
Comment 2 GNOME Infrastructure Team 2021-07-05 13:21:39 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.