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

Bug 41831

Summary: repoman always says metadata.xml is bad
Product: Gentoo Linux Reporter: Aron Griffis (RETIRED) <agriffis>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: obz, rizzo
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Aron Griffis (RETIRED) gentoo-dev 2004-02-16 14:45:52 UTC
I'm using 2.0.50-r1 at the moment, but this has been happening for months.  I recently realized this doesn't happen for everybody...

portage/app-emacs/w3 $ repoman
...
  metadata.bad         1
   app-emacs/w3/metadata.xml

portage/app-emacs/w3 $ cat metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>emacs</herd>
</pkgmetadata>

$ emerge --info
Portage 2.0.50-r1 (default-alpha-1.4, gcc-3.3.2, glibc-2.3.3_pre20040207-r0, 2.4.21-alpha-r1)
=================================================================
System uname: 2.4.21-alpha-r1 alpha EV67
Gentoo Base System version 1.4.3.13
distcc 2.12.1 alphaev67-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r1
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="alpha ~alpha"
AUTOCLEAN="yes"
CFLAGS="-mcpu=ev67 -O3 -pipe -mieee"
CHOST="alphaev67-unknown-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/X11/Sessions /etc/X11/app-defaults /etc/X11/rstart /etc/X11/serverconfig /etc/X11/starthere /etc/X11/sysconfig /etc/X11/xdm /etc/X11/xinit /etc/X11/xkb /etc/afs/C /etc/afs/afsws /etc/gconf /etc/init.d /etc/openldap /etc/postfix/sample /etc/sound /etc/env.d"
CXXFLAGS="-mcpu=ev67 -O3 -pipe -mieee"
DISTDIR="/usr/distfiles"
FEATURES="ccache cvs noclean sandbox"
GENTOO_MIRRORS="http://kant.zk3.dec.com/gentoo/mirror/sources/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/local/tmp"
PORTDIR="/usr/local/home/agriffis/portage"
PORTDIR_OVERLAY="/usr/local/home/agriffis/proj/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alpha berkdb bonobo cdr crypt cscope cups directfb encode ev6 foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imap imlib jpeg ldap libg++ libwww mikmod motif mozilla moznocompose moznoirc moznomail nas ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby sdl snmp socks5 spell ssl tcltk tcpd tetex truetype xml2 xmms xv zlib"
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-02-16 14:46:49 UTC
portage/app-emacs/w3 $ xmllint --valid metadata.xml 
error : Operation in progress
error : Operation in progress
error : Operation in progress
metadata.xml:2: I/O error : failed to load external entity "http://www.gentoo.org/dtd/metadata.dtd"
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
                                                                      ^
metadata.xml:3: validity error : Validation failed: no DTD found !
<pkgmetadata>
            ^
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>emacs</herd>
</pkgmetadata>
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-02-17 06:54:10 UTC
It would appear that xmllint is not able to contact the website and download the dtd. Is the machine allowed to connect to the outside world? What does strace tell you?
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-02-17 07:31:51 UTC
The machine has access to the outside world via an http proxy.  Does xmllint only work with direct connections?  According to strace, it appears that xmllint is trying to connect directly to www.gentoo.org

Shouldn't portage (i.e. the portage package) be installing a local DTD and a catalog mapping so that the network isn't needed for xmllint.  That would make repoman faster, too!

From my review of the xmllint man-page, it doesn't appear to honor proxies.  Additionally it dies immediately when run under "socksify" :-(
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-02-17 10:46:30 UTC
Obz, do you mind casting your xml-aware eye on this bug?
Comment 5 Mike Gardiner (RETIRED) gentoo-dev 2004-02-17 15:36:27 UTC
Aron, you could download the DTD and add some rewrites in /etc/xml/catalog like:

<rewriteURI uriStartString="http://www.gentoo.org/dtd/metadata.dtd" rewritePrefix="/usr/share/xml/gentoo/dtd/metadata.dtd"/>
<rewriteSystem systemIdStartString="http://www.gentoo.org/dtd/metadata.dtd" rewritePrefix="/usr/share/xml/gentoo/dtd/metadata.dtd"/>

however that won't fix it for all users behind proxies who want to run repoman (if that's the error group). Also, does portage use xmllint but not depend on libxml2?...
Comment 6 Don Seiler (RETIRED) gentoo-dev 2004-04-08 07:24:50 UTC
I'm in the same boat. :p
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2004-04-08 08:34:06 UTC
rizzo, obz gave me a possible workaround/fix in comment #5, would you mind testing that?  I haven't had the chance.
Comment 8 Don Seiler (RETIRED) gentoo-dev 2004-04-08 08:40:41 UTC
Worked like a champ.  Had to create the /usr/share/xml/gentoo and gentoo/dtd dir, but you probably assumed that.

Yeah I would think having this file locally would be a better process than having it make a net connection every time.
Comment 9 Aron Griffis (RETIRED) gentoo-dev 2004-05-24 20:26:26 UTC
Genone, will this be fixed in repoman eventually?  It seems like an easy one...
Comment 10 Brian Harring (RETIRED) gentoo-dev 2004-08-11 14:43:23 UTC
Marking as a dupe of 57210, since the fix was commited in .51 (details are in that bug).

*** This bug has been marked as a duplicate of 57210 ***