xmlcatmgr & docproj broken?
Hiroki Sato
hrs at FreeBSD.org
Mon Dec 29 10:46:22 PST 2003
Sergei Kolobov <sergei at freebsd.org> wrote
in <20031229174252.GC719 at chetwood.ru>:
sergei> I have seen similar problems in the past (i.e. before my recent commit
sergei> to upgrade xmlcatmgr to 1.2) where ${PREFIX}/share/xml/catalog existed,
sergei> but it wasn't a true XML catalog (i.e. created in pre-xmlcatmgr era).
sergei> In those cases, running portupgrade -fR docbook-* to force
sergei> rebuilding/reinstalling docbook ports and all dependencies helped.
sergei> YMMV, though.
sergei>
sergei> > I think the cause is that while "add CATALOG" in the post-install
sergei> > target uses ${RELDIR}/catalog, in pkg-plist
sergei> > ${PREFIX}/share/sgml/${RELDIR}(%%DTDDIR%%) is used. It is probably
sergei> > a bug in the port skeleton, but removing a line
sergei> > CATALOG "docbook/dsssl/modular/catalog" in
sergei> > /usr/local/share/sgml/catalog.ports manually, you can avoid such a problem.
sergei>
sergei> I cannot see any problem in the port's skeleton.
sergei>
sergei> > Kuriyama-san, could you please fix %%DTDDIR%%? The pathnames
sergei> > should be consistent.
sergei>
sergei> Please explain.
This problem has nothing to do with xmlcatmgr itself. When you deinstall
the port, the CATALOG line is not removed. This is because the port's Makefile
adds 'CATALOG "${RELDIR}"' during the post-install target,
but 'CATALOG "${PREFIX}/share/sgml/${RELDIR}"' when the port is
deinstalled (in pkg-plist). This inconsistent behavior
makes the installation just after deinstallation fail; adding
'CATALOG "${RELDIR}"' is rejected since the line already exists.
BTW, when you use the package, the adding/removing CATALOG line always use
'CATALOG "${PREFIX}/share/sgml/${RELDIR}"', so the problem does not appear.
Probably a fix, something like the attached patch, is needed.
At least, I could reproduce the problem using "make install; make deinstall;
make install" in textproc/dsssl-docbook-modular.
--
| Hiroki SATO
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/dsssl-docbook-modular/Makefile,v
retrieving revision 1.53
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.53 Makefile
--- Makefile 13 Nov 2003 12:54:52 -0000 1.53
+++ Makefile 29 Dec 2003 18:21:11 -0000
@@ -27,7 +27,7 @@
INSTDIR= ${PREFIX}/share/sgml/${RELDIR}
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
CATALOG_PORTS_SGML= ${PREFIX}/share/sgml/catalog.ports
-PLIST_SUB= XMLCATMGR=${XMLCATMGR} DTDDIR=${INSTDIR} \
+PLIST_SUB= XMLCATMGR=${XMLCATMGR} DTDDIR=${RELDIR} \
CATALOG_PORTS_SGML=${CATALOG_PORTS_SGML}
do-build:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20031230/0764e074/attachment.bin
More information about the freebsd-ports
mailing list