<?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>168988</bug_id>
          
          <creation_ts>2007-03-02 11:12 0000</creation_ts>
          <short_desc>dev-perl/XML-SAX: protect ParserDetails.ini</short_desc>
          <delta_ts>2007-03-04 15:59:51 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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>152198</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>Martin.vGagern@gmx.net</reporter>
          <assigned_to>perl@gentoo.org</assigned_to>
          <cc>askwar@digitalprojects.com</cc>

      

      
          <long_desc isprivate="0">
            <who>Martin.vGagern@gmx.net</who>
            <bug_when>2007-03-02 11:12:39 0000</bug_when>
            <thetext>dev-perl/XML-SAX installs a file called ParserDetails where installed parsers should be listed. One such other parser is XML-LibXML. Right now this file is a normal installed file and thus overwrites the version already present with each upgrade:

# emerge XML-LibXML
...
# grep . /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/ParserDetails.ini
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1
# emerge XML-SAX
...
# grep . /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/ParserDetails.ini
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1

I can see three solutions:
1. Handle ParserDetails.ini in postinst phase, like XML-LibXML does
2. Config-protect ParserDetails.ini
3. Have an eselect module take care of managing ParserDetails.ini

The first approach is more automatic, but if I understand things correctly the default parser is derived from the order in this file, which it would break.

We might introduce a new configuration file where users can specify thir precedence of parsers, and have every parser-related ebuild update the ini file according to that file. This could be based on an eclass or an eselect module.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-03-02 11:21:37 0000</bug_when>
            <thetext>eselect module?! You are joking, right? o_O
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>Martin.vGagern@gmx.net</who>
            <bug_when>2007-03-02 11:32:25 0000</bug_when>
            <thetext>Created an attachment (id=111790)
Patch to XML-SAX-0.15.ebuild moving ParserDetails.ini setting to postinst

These modifications to the ebuild suppress the creation of ParserDetails.ini during the install phase completely. Instead a corresponding call is makde in postinst. The code there is taken from XML-LibXML but with an added &quot;|| die&quot;.

This approach will make the default parser setting dependant on emerge order, and as it is so far the ParserDetails.ini will still be around when you unmerge XML-SAX. I&apos;m not sure what the right solution would be there.

(In reply to comment #1)
&gt; eselect module?! You are joking, right? o_O

I wasn&apos;t. Is eselect being deprecated, or is it simply not the right tool?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mcummings@gentoo.org</who>
            <bug_when>2007-03-04 15:59:51 0000</bug_when>
            <thetext>applied, thanks!</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>111790</attachid>
            <date>2007-03-02 11:32 0000</date>
            <desc>Patch to XML-SAX-0.15.ebuild moving ParserDetails.ini setting to postinst</desc>
            <filename>168988.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9kZXYtcGVybC9YTUwtU0FYL1hNTC1TQVgtMC4xNS5lYnVpbGQJMjAw
Ny0wMi0xNyAxNjozMzoyNS4wMDAwMDAwMDAgKzAxMDAKKysrIC91c3IvbG9jYWwvcG9ydGFnZS9k
ZXYtcGVybC9YTUwtU0FYL1hNTC1TQVgtMC4xNS5lYnVpbGQJMjAwNy0wMy0wMiAxMTo1MjowOS4w
MDAwMDAwMDAgKzAxMDAKQEAgLTI1LDggKzI1LDE4IEBACiAJZXZhbCAkKHBlcmwgJy1WOmluc3Rh
bGx2ZW5kb3JsaWInKQogCXVucGFjayAke0F9CiAJY2QgIiR7U30iCisKKwkjIG5ldmVyIHdyaXRl
IFBhcnNlckRldGFpbHMuaW5pIGluIGluc3RhbGw7IGRvIHRoYXQgaW4gcG9zdGluc3QKIAlzZWQg
LWkgXAotCQktZSAicyxcKC1NWE1MOjpTQVhcKSwtSSR7RH0vJHtpbnN0YWxsdmVuZG9ybGlifSBc
MSwiIFwKKwkJLWUgJ3MvaWYgKFwkd3JpdGVfaW5pX29rKS9pZiAoMCBcJlwmICR3cml0ZV9pbmlf
b2spLycgXAogCQlNYWtlZmlsZS5QTCB8fCBkaWUKKwogCWVwYXRjaCAiJHtGSUxFU0RJUn0iL2Vu
Y29kaW5ncy5wYXRjaAogfQorCitwa2dfcG9zdGluc3QoKSB7CisJcGVybC1tb2R1bGVfcGtnX3Bv
c3RpbnN0CisJcGVybCAtTVhNTDo6U0FYIFwKKwkJLWUgIlhNTDo6U0FYLT5hZGRfcGFyc2VyKHEo
WE1MOjpTQVg6OlB1cmVQZXJsKSktPnNhdmVfcGFyc2VycygpIiBcCisJCXx8IGRpZSAiZXJyb3Ig
YWRkaW5nIHBhcnNlciIKK30K
</data>        

          </attachment>
    </bug>

</bugzilla>