<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>87509</bug_id>
          
          <creation_ts>2005-03-31 23:00 0000</creation_ts>
          <short_desc>app-text/sgmltools-lite doesn&apos;t &quot;generate&quot; necessary (?) python byte-compiled files.</short_desc>
          <delta_ts>2005-05-29 07:23:50 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>87491</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>tacvbo@tacvbo.net</reporter>
          <assigned_to>text-markup@gentoo.org</assigned_to>
          <cc>tove@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>tacvbo@tacvbo.net</who>
            <bug_when>2005-03-31 23:00:55 0000</bug_when>
            <thetext>Inside

/usr/share/sgml/misc/sgmltools/python
/usr/share/sgml/misc/sgmltools/python/backends

there are only &apos;.py&apos; files. In order to sgmltools work, should be &apos;.pyc&apos; 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).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tove@gentoo.org</who>
            <bug_when>2005-04-02 10:08:08 0000</bug_when>
            <thetext>Created an attachment (id=55114)
sgmltools-lite fix

generates byte compiled python modules</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tacvbo@tacvbo.net</who>
            <bug_when>2005-04-02 10:54:17 0000</bug_when>
            <thetext>Cool, it works. Can it be commited? :-)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tove@gentoo.org</who>
            <bug_when>2005-04-02 13:44:45 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tacvbo@tacvbo.net</who>
            <bug_when>2005-04-02 21:35:16 0000</bug_when>
            <thetext>Okey, I reach my top of knowledge in sgml tools related things.. (it was so easy ;-P). I&apos;m doing things without knowing a lot with what I&apos;m doing..

First, I can not find any example...

$ find . -type f -name &quot;*ebuild&quot; -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&apos;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=&quot;Python interface to SGML software in a DocBook/OpenJade env&quot;
 HOMEPAGE=&quot;http://sgmltools-lite.sourceforge.net/&quot;
@@ -74,5 +74,17 @@

 }

+pkg_postinst() {
+       python_mod_optimize ${ROOT}usr/share/sgml/misc/sgmltools/python
+       sgml-catalog_pkg_postinst &quot;/etc/sgml/sgml-lite.cat&quot; \
+               &quot;/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat&quot;
+}
+
+pkg_postrm() {
+       python_mod_cleanup ${ROOT}usr/share/sgml/misc/sgmltools/python
+       sgml-catalog_pkg_postrm &quot;/etc/sgml/sgml-lite.cat&quot; \
+               &quot;/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat&quot;
+}
+
 sgml-catalog_cat_include &quot;/etc/sgml/sgml-lite.cat&quot; \
        &quot;/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat&quot;

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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tacvbo@tacvbo.net</who>
            <bug_when>2005-04-02 22:00:10 0000</bug_when>
            <thetext>This is one of my &quot;testings&quot;:

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&apos;m not too wrong, or maybe its a sophism and I&apos;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 &quot;/etc/sgml/dsssl-docbook-stylesheets.cat&quot;
 CATALOG &quot;/etc/sgml/sgml-docbook-4.0.cat&quot;
 CATALOG &quot;/etc/sgml/xml-simple-docbook-4.1.2.4.cat&quot;
-CATALOG &quot;/etc/sgml/sgml-lite.cat&quot;
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 &quot;/etc/sgml/dsssl-docbook-stylesheets.cat&quot;
 CATALOG &quot;/etc/sgml/sgml-docbook-4.0.cat&quot;
 CATALOG &quot;/etc/sgml/xml-simple-docbook-4.1.2.4.cat&quot;
-CATALOG &quot;/etc/sgml/sgml-lite.cat&quot;
tacvbo@avalancha tmp1 $ diff -u &lt;(diff -ur 1*) &lt;(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 &quot;/etc/sgml/dsssl-docbook-stylesheets.cat&quot;
  CATALOG &quot;/etc/sgml/sgml-docbook-4.0.cat&quot;

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tove@gentoo.org</who>
            <bug_when>2005-04-03 12:57:36 0000</bug_when>
            <thetext>see http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&amp;chap=2

sgml-catalog&apos;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&apos;s necessary to call them explicitly:

For example:
pkg_postinst() {
   python_mod_optimize ${ROOT}usr/share/sgml/misc/sgmltools/python
   sgml-catalog_pkg_postinst
}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leonardop@gentoo.org</who>
            <bug_when>2005-05-29 07:23:50 0000</bug_when>
            <thetext>Resolved in sgmltools-lite-3.0.3-r8.ebuild. Thanks tove :).
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55114</attachid>
            <date>2005-04-02 10:08 0000</date>
            <desc>sgmltools-lite fix</desc>
            <filename>sgmltools-lite.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9jdnMuZ2VudG9vLm9yZy9nZW50b28teDg2L2FwcC10ZXh0L3NnbWx0
b29scy1saXRlL3NnbWx0b29scy1saXRlLTMuMC4zLXI3LmVidWlsZAkyMDA1LTAzLTIxIDEyOjUx
OjUwLjAwMDAwMDAwMCArMDEwMAorKysgL3Vzci9wb3J0YWdlL3BvcnRhZ2UvYXBwLXRleHQvc2dt
bHRvb2xzLWxpdGUvc2dtbHRvb2xzLWxpdGUtMy4wLjMtcjcuZWJ1aWxkCTIwMDUtMDQtMDIgMTk6
NTg6NDkuMDAwMDAwMDAwICswMjAwCkBAIC0yLDcgKzIsNyBAQAogIyBEaXN0cmlidXRlZCB1bmRl
ciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHYyCiAjICRIZWFk
ZXI6IC92YXIvY3Zzcm9vdC9nZW50b28teDg2L2FwcC10ZXh0L3NnbWx0b29scy1saXRlL3NnbWx0
b29scy1saXRlLTMuMC4zLXI3LmVidWlsZCx2IDEuMTQgMjAwNS8wMy8xNSAxNDoyODowOSBzZWVt
YW50IEV4cCAkCiAKLWluaGVyaXQgc2dtbC1jYXRhbG9nCitpbmhlcml0IHNnbWwtY2F0YWxvZyBw
eXRob24KIAogREVTQ1JJUFRJT049IlB5dGhvbiBpbnRlcmZhY2UgdG8gU0dNTCBzb2Z0d2FyZSBp
biBhIERvY0Jvb2svT3BlbkphZGUgZW52IgogSE9NRVBBR0U9Imh0dHA6Ly9zZ21sdG9vbHMtbGl0
ZS5zb3VyY2Vmb3JnZS5uZXQvIgpAQCAtNzQsNSArNzQsMTMgQEAKIAogfQogCitwa2dfcG9zdGlu
c3QoKSB7CisJcHl0aG9uX21vZF9vcHRpbWl6ZSAke1JPT1R9dXNyL3NoYXJlL3NnbWwvbWlzYy9z
Z21sdG9vbHMvcHl0aG9uCit9CisKK3BrZ19wb3N0cm0oKSB7CisJcHl0aG9uX21vZF9jbGVhbnVw
ICR7Uk9PVH11c3Ivc2hhcmUvc2dtbC9taXNjL3NnbWx0b29scy9weXRob24KK30KKwogc2dtbC1j
YXRhbG9nX2NhdF9pbmNsdWRlICIvZXRjL3NnbWwvc2dtbC1saXRlLmNhdCIgXAogCSIvdXNyL3No
YXJlL3NnbWwvc3R5bGVzaGVldHMvc2dtbHRvb2xzL3NnbWx0b29scy5jYXQiCg==
</data>        

          </attachment>
    </bug>

</bugzilla>