Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
Inside /usr/share/sgml/misc/sgmltools/python /usr/share/sgml/misc/sgmltools/python/backends there are only '.py' files. In order to sgmltools work, should be '.pyc' files also. They are auto-generated when sgmtools runs as root. Should the ebuild generate them inside ${WORKDIR} and then merge them to the tree? The lack of those archives (.pyc) causes sandbox violations when an ebuild/makefile detects this tools and try to generate html doc from sgml (like mutt-ng ebuild).
Created an attachment (id=55114) [edit] sgmltools-lite fix generates byte compiled python modules
Cool, it works. Can it be commited? :-)
My patch was *not* correct: It misses the sgml-catalog functions! It is necessary to add sgml-catalog_pkg_post{inst,rm} to pkg_post{inst,rm}. Sorry.
Okey, I reach my top of knowledge in sgml tools related things.. (it was so easy ;-P). I'm doing things without knowing a lot with what I'm doing.. First, I can not find any example... $ find . -type f -name "*ebuild" -exec egrep -i sgml-catalog_pkg /dev/null {} \; tacvbo@avalancha portage $ Then, there is no man page for sgml-catalog.eclass... so, I directly see sgml-catalog.eclass.. and I have a question based on my observation. If you dont explicit put the sgml-catalog_pkg_post{inst,rm} to pkg_post{inst,rm} any way its executed. Also (I think) this is wy there is no package who uses that functions. (Or maybe I'm using them wrong). I have the same behavior (and files) adding that functions or not. Exactly the same. --- /usr/portage/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r7.ebuild 2005-03-15 08:35:23.000000000 -0600 +++ /usr/local/portage/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r7.ebuild 2005-04-02 22:59:44.000000000 -0600 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r7.ebuild,v 1.14 2005/03/15 14:28:09 seemant Exp $ -inherit sgml-catalog +inherit sgml-catalog python DESCRIPTION="Python interface to SGML software in a DocBook/OpenJade env" HOMEPAGE="http://sgmltools-lite.sourceforge.net/" @@ -74,5 +74,17 @@ } +pkg_postinst() { + python_mod_optimize ${ROOT}usr/share/sgml/misc/sgmltools/python + sgml-catalog_pkg_postinst "/etc/sgml/sgml-lite.cat" \ + "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" +} + +pkg_postrm() { + python_mod_cleanup ${ROOT}usr/share/sgml/misc/sgmltools/python + sgml-catalog_pkg_postrm "/etc/sgml/sgml-lite.cat" \ + "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" +} + sgml-catalog_cat_include "/etc/sgml/sgml-lite.cat" \ "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" This patch is what you was talking about, or not? My disclaimer is that I can really be wrong, so dont beleive a lot. :-P
This is one of my "testings": 1i - dir for files modified by ebuild without patches (after installed) 1u - dir for files modified by ebuild without patches (after uninstalled) 2i - dir for files modified by ebuild with patches (after installed) 2u - dir for files modified by ebuild with patches (after uninstalled) Inside that dirs (if they exist), /etc/sgml/sgml-lite.cat, /usr/share/sgml/stylesheets/sgmltools/sgmltools.cat and /etc/sgml/catalog files. The example only shows diffs between only for /etc/sgml/catalog (for the example purpose), and in both cases are the same (it just changes the timestamps) , so maybe I'm not too wrong, or maybe its a sophism and I'm just deceiving myself and doing weird and incoherent things. :P tacvbo@avalancha tmp1 $ diff -ur 1* diff -ur 1i/catalog 1u/catalog --- 1i/catalog 2005-04-02 23:46:56.000000000 -0600 +++ 1u/catalog 2005-04-02 23:47:23.000000000 -0600 @@ -7,4 +7,3 @@ CATALOG "/etc/sgml/dsssl-docbook-stylesheets.cat" CATALOG "/etc/sgml/sgml-docbook-4.0.cat" CATALOG "/etc/sgml/xml-simple-docbook-4.1.2.4.cat" -CATALOG "/etc/sgml/sgml-lite.cat" tacvbo@avalancha tmp1 $ diff -ur 2* diff -ur 2i/catalog 2u/catalog --- 2i/catalog 2005-04-02 23:48:24.000000000 -0600 +++ 2u/catalog 2005-04-02 23:49:12.000000000 -0600 @@ -7,4 +7,3 @@ CATALOG "/etc/sgml/dsssl-docbook-stylesheets.cat" CATALOG "/etc/sgml/sgml-docbook-4.0.cat" CATALOG "/etc/sgml/xml-simple-docbook-4.1.2.4.cat" -CATALOG "/etc/sgml/sgml-lite.cat" tacvbo@avalancha tmp1 $ diff -u <(diff -ur 1*) <(diff -ur 2*) --- /dev/fd/63 2005-04-02 23:49:36.818400984 -0600 +++ /dev/fd/62 2005-04-02 23:49:36.820400680 -0600 @@ -1,6 +1,6 @@ -diff -ur 1i/catalog 1u/catalog ---- 1i/catalog 2005-04-02 23:46:56.000000000 -0600 -+++ 1u/catalog 2005-04-02 23:47:23.000000000 -0600 +diff -ur 2i/catalog 2u/catalog +--- 2i/catalog 2005-04-02 23:48:24.000000000 -0600 ++++ 2u/catalog 2005-04-02 23:49:12.000000000 -0600 @@ -7,4 +7,3 @@ CATALOG "/etc/sgml/dsssl-docbook-stylesheets.cat" CATALOG "/etc/sgml/sgml-docbook-4.0.cat"
see http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=2 sgml-catalog's EXPORT_FUNCTIONS define default functions for pkg_postrm and pkg_postinst. These were replaced by the functions in my patch. To reactivate them it's necessary to call them explicitly: For example: pkg_postinst() { python_mod_optimize ${ROOT}usr/share/sgml/misc/sgmltools/python sgml-catalog_pkg_postinst }
Resolved in sgmltools-lite-3.0.3-r8.ebuild. Thanks tove :).