Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 840053 - dev-perl/XML-Validator-Schema: ParserDetails.ini is not generated automatically anymore by dev-perl XML parsers since update to EAPI 8
Summary: dev-perl/XML-Validator-Schema: ParserDetails.ini is not generated automatical...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 842048
  Show dependency tree
 
Reported: 2022-04-22 09:29 UTC by Adam B
Modified: 2022-05-09 01:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam B 2022-04-22 09:29:12 UTC
I noticed that during installation of dev-perl/XML-Validator-Schema, there is an error saying that XML-SAX is not configured properly. 

Indeed, as opposed to a system that's based on last June's portage Snapshot, my current system based on April 12th's snapshot does not have a ParserDetails.ini.



According to the ebuild manpage, the behaviour in EAPI7 regarding ROOT has changed:

Please note an important recent change regarding the ROOT variable -- in EAPI 7 ebuilds, this variable will default to "" rather than the traditional "/" within ebuilds when pointing to the root filesystem, and when set to a non-root path this variable will never contain a trailing slash. 

Please make note that this will mean that ebuilds must use different logic in conditionals to determine if they are installing to the root filesystem -- use [[ "$ROOT" == "" ]] instead of [[ "$ROOT" == "/" ]].




I looked at the ebuild of XML-SAX and saw that the configuration of ParserDetails.ini only happens if $ROOT is '/'.
The actual change between last year's ebuild file and April's ebuild file is the change from EAPI6 to EAPI8.

I believe the ebuild has to be fixed to compare against "" instead of against "/". For debugging, I modified the ebuild file to print the value of $ROOT and it is indeed an empty string.

Btw, none of the xml parser perl modules generate the .ini file. 
I looked for the comparison in my portage tree and all the parsers that are in the ini file on my old system are shown as having the same type of code:

/usr/portage # grep '"$ROOT" = "/"' -R *
dev-perl/XML-SAX/XML-SAX-1.20.0.ebuild:	if [[ "$ROOT" = "/" ]] ; then
dev-perl/XML-SAX-Expat/XML-SAX-Expat-0.510.0-r1.ebuild:	if [[ "$ROOT" = "/" ]] ; then
dev-perl/XML-LibXML/XML-LibXML-2.20.700.ebuild:	if [[ "$ROOT" = "/" ]] ; then

This explains why the ParserDetails.ini doesn't exist at all. I think that all three comparisons have to be fixed.
Comment 1 Adam B 2022-04-22 09:34:46 UTC
Oh, and btw, dev-perl/XML-Validator-Schema is not installed correctly due to this problem.

Before:

equery f dev-perl/XML-Validator-Schema
 * Searching for XML-Validator-Schema in dev-perl ...
 * Contents of dev-perl/XML-Validator-Schema-1.100.0-r1:
/usr
/usr/share
/usr/share/doc
/usr/share/doc/XML-Validator-Schema-1.100.0-r1
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/Changes.bz2
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/README.bz2
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/TODO.bz2


After local fix of XML-SAX ParserDetails:

equery f dev-perl/XML-Validator-Schema
 * Searching for XML-Validator-Schema in dev-perl ...
 * Contents of dev-perl/XML-Validator-Schema-1.100.0-r1:
/usr
/usr/lib64
/usr/lib64/perl5
/usr/lib64/perl5/vendor_perl
/usr/lib64/perl5/vendor_perl/5.34
/usr/lib64/perl5/vendor_perl/5.34/XML
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/Attribute.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/AttributeLibrary.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/AttributeNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/ComplexTypeNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/ElementLibrary.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/ElementNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/ElementRefNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/Library.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/ModelNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/Node.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/Parser.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/RootNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/SimpleType.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/SimpleTypeNode.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/TypeLibrary.pm
/usr/lib64/perl5/vendor_perl/5.34/XML/Validator/Schema/Util.pm
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux/auto
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux/auto/XML
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux/auto/XML/Validator
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux/auto/XML/Validator/Schema
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux/auto/XML/Validator/Schema/.packlist
/usr/share
/usr/share/doc
/usr/share/doc/XML-Validator-Schema-1.100.0-r1
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/Changes.bz2
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/README.bz2
/usr/share/doc/XML-Validator-Schema-1.100.0-r1/TODO.bz2


Not sure whether this is a second bug, or expected/wanted. But before the fix, the module was installed, but basically without any actual perl code (which is how I noticed that something is wrong).
Comment 2 Jonas Stein gentoo-dev 2022-04-22 16:10:00 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. This includes
* the complete build.log as attachment and
* a paste of the emerge info 
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Comment 3 Larry the Git Cow gentoo-dev 2022-04-22 17:36:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2877f9c61d72d9bd3168b7b8994092a54a8e88cb

commit 2877f9c61d72d9bd3168b7b8994092a54a8e88cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 16:17:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:36:01 +0000

    dev-perl/XML-SAX-Expat: fix ROOT check in pkg_postinst
    
    Closes: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ML-SAX-Expat-0.510.0-r1.ebuild => XML-SAX-Expat-0.510.0-r2.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48de9776962bd33009885e7a71da5a9a8b67c7dc

commit 48de9776962bd33009885e7a71da5a9a8b67c7dc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:34:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:36:03 +0000

    dev-perl/XML-LibXML: fix ROOT check in pkg_postinst
    
    Bug: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{XML-LibXML-2.20.700.ebuild => XML-LibXML-2.20.700-r1.ebuild}     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=115bff19b509ec3474312a7c0da1f18d3307fb36

commit 115bff19b509ec3474312a7c0da1f18d3307fb36
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:33:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:36:02 +0000

    dev-perl/XML-SAX: fix ROOT check in pkg_postinst
    
    Bug: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-perl/XML-SAX/{XML-SAX-1.20.0.ebuild => XML-SAX-1.20.0-r1.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-22 17:36:28 UTC
Big thanks for the report (and details) and apologies for the error.
Comment 5 Larry the Git Cow gentoo-dev 2022-04-22 17:43:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=413e840fc7c2b190b0e00677cbe509b5812d63d6

commit 413e840fc7c2b190b0e00677cbe509b5812d63d6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:38:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:43:03 +0000

    dev-lang/perl: fix ROOT check in pkg_postinst
    
    Bug: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/perl/{perl-5.34.0-r7.ebuild => perl-5.34.0-r10.ebuild} | 2 +-
 dev-lang/perl/{perl-5.34.0-r8.ebuild => perl-5.34.0-r11.ebuild} | 2 +-
 dev-lang/perl/{perl-5.34.0-r6.ebuild => perl-5.34.0-r9.ebuild}  | 2 +-
 dev-lang/perl/{perl-5.34.1.ebuild => perl-5.34.1-r2.ebuild}     | 2 +-
 dev-lang/perl/{perl-5.34.1-r1.ebuild => perl-5.34.1-r3.ebuild}  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2022-04-22 17:51:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0df08e5dcb54b7c649697a33c673879610fab9bd

commit 0df08e5dcb54b7c649697a33c673879610fab9bd
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:49:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:51:24 +0000

    dev-perl/XML-LibXML: depend on newer XML-Sax
    
    Needed to avoid "miscompilation" (essentially empty install), as newer XML-Sax
    has the ROOT check fixed.
    
    Closes: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{XML-LibXML-2.20.700-r1.ebuild => XML-LibXML-2.20.700-r2.ebuild} | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4541971d52f945b506ab022706cb04fd3a209ae6

commit 4541971d52f945b506ab022706cb04fd3a209ae6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:47:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:51:23 +0000

    dev-perl/XML-SAX-Expat: depend on newer XML-Sax
    
    Needed to avoid "miscompilation" (essentially empty install), as newer XML-Sax
    has the ROOT check fixed.
    
    Closes: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 ...L-SAX-Expat-0.510.0-r2.ebuild => XML-SAX-Expat-0.510.0-r3.ebuild} | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=387e4ae026e0d3b3e0ae36316622e4a00eaa81e7

commit 387e4ae026e0d3b3e0ae36316622e4a00eaa81e7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 17:46:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 17:51:22 +0000

    dev-perl/XML-Validator-Schema: depend on newer XML-Sax
    
    Needed to avoid "miscompilation" (essentially empty install), as newer XML-Sax
    has the ROOT check fixed.
    
    Closes: https://bugs.gentoo.org/840053
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ma-1.100.0-r1.ebuild => XML-Validator-Schema-1.100.0-r2.ebuild} | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-22 17:53:13 UTC
(In reply to Sam James from comment #4)
> Big thanks for the report (and details) and apologies for the error.

I've also checked the tree and fixed some other instances.
Comment 8 Adam B 2022-04-24 13:27:13 UTC
(In reply to Sam James from comment #4)
> Big thanks for the report (and details) and apologies for the error.

No worries, thanks a lot for the quick fix!
Comment 9 Michael Yagliyan 2022-05-09 00:52:51 UTC
As a result of this change, I am now seeing a couple of ebuild messages that I never saw before.  Here they are (slightly reformatted):

* Messages for package dev-perl/XML-LibXML-2.20.700:

  To remove XML::LibXML::SAX::Parser run:
   perl -MXML::SAX -e 'XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()'

  To remove XML::LibXML::SAX run:
   perl -MXML::SAX -e 'XML::SAX->remove_parser(q(XML::LibXML::SAX))->save_parsers()'

* Messages for package dev-perl/XML-SAX-Expat-0.510.0-r1:

  To remove XML::SAX::Expat run:
   perl -MXML::SAX -e 'XML::SAX->remove_parser(q(XML::SAX::Expat))->save_parsers()'

I'm looking at the logic in the ebuild and (not being an expert in ebuild logic, nor in Perl module configuration) it's not clear to me what I should be doing now.  It seems odd to me that the ebuild would install and then not complete this last step, unless I am missing some context that this last step is not actually necessary for most users or something along those lines.

Could someone please explain?  Am I just seeing these messages because something on my system is misconfigured that I must fix, or that some other update will already fix?  If not, then I can tell you from a Gentoo system maintainer's perspective, these messages are not providing sufficient information for me to know what to do or why to do it.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 00:54:56 UTC
Michael, thanks for your comment, I think we should address it in bug 842048 which was already filed for this issue.
Comment 11 Michael Yagliyan 2022-05-09 01:33:06 UTC
Awesome, thank you for the quick and helpful reply Sam!  I'll follow that bug.