Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 208887

Summary: dev-libs/libxml2 assumes that /usr/bin/xmlcatalog is available in pkg_postinst
Product: Gentoo Linux Reporter: Chris Gianelloni (RETIRED) <wolf31o2>
Component: New packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: blocker CC: releng
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: libxml2-build.patch

Description Chris Gianelloni (RETIRED) gentoo-dev 2008-02-04 20:32:43 UTC
As strange as this sounds, this package assumes that /usr/bin/xmlcatalog is available during pkg_postinst, even when ROOT != /, which causes problems for the release.  Currently, libxml2 gets pulled into stage1 by gettext.  Well, there's no guarantee that the seed stage will have xmlcatalog, and stage1 is built with ROOT=/tmp/stage1root, so we're trying to run a non-existent xmlcatalog from / and writing to ${ROOT}etc/xml/catalog, which always produces a 0-byte file with no contents.  Since the ebuild only runs the xmlcatalog code when ${ROOT}etc/xml/catalog doesn't exist, we end up with an empty file in the stages.

I'm attaching a simple fix to this bug, which causes the xmlcatalog code to not run for USE=build or USE=bootstrap... this will ensure the xmlcatalog is created during stage3, when ROOT=/ and /usr/bin/xmlcatalog will definitely be available.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2008-02-04 20:34:31 UTC
Created attachment 142674 [details, diff]
libxml2-build.patch

Here's the patch.  It simply skips the rest of pkg_postinst if USE includes build or bootstrap.
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2008-02-04 20:34:50 UTC
If nobody objects, I'd like to go ahead and commit this.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-02-04 21:53:42 UTC
looks ok to me. Just stick a comment like 

# Fix for release media, see bug #208887
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2008-02-05 03:16:10 UTC
Cool... and... done...