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

Bug 262355

Summary: app-portage/layman-1.1.1 crashed - unable to parse overlay file
Product: Gentoo Linux Reporter: William Roe <willroe>
Component: Current packagesAssignee: Gunnar Wrobel (RETIRED) <wrobel>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description William Roe 2009-03-13 17:01:28 UTC
After trying to update my list of overlays, layman is unable to parse the overlay.xml file. I have run the file through xmlproc_parse and it returns no errors and no warnings (I've also sanity checked it). There is a lot of white space but that shouldn't affect anything. 
Listing local overlays with `layman -l` works fine, but trying to either fetch the remote overlays `layman -f` or list remove overlays `layman -L` fails.

Reproducible: Always

Steps to Reproduce:
1. run `layman -L`
2. that's it
3.

Actual Results:  
sudo layman -L
Password: 
Traceback (most recent call last):
  File "/usr/bin/layman", line 37, in <module>
    main()
  File "/usr/bin/layman", line 34, in main
    Actions(Config())
  File "/usr/lib64/python2.5/site-packages/layman/action.py", line 463, in __init__
    Fetch(config).run()
  File "/usr/lib64/python2.5/site-packages/layman/action.py", line 66, in __init__
    self.db = RemoteDB(config)
  File "/usr/lib64/python2.5/site-packages/layman/db.py", line 234, in __init__
    Overlays.__init__(self, paths, ignore, quiet)
  File "/usr/lib64/python2.5/site-packages/layman/overlay.py", line 76, in __init__
    self.read_file(path)
  File "/usr/lib64/python2.5/site-packages/layman/overlay.py", line 90, in read_file
    self.read(document)
  File "/usr/lib64/python2.5/site-packages/layman/overlay.py", line 111, in read
    + str(error))
Exception: Failed to parse the overlay list!
Error was:
no element found: line 1, column 0

Expected Results:  
A list of remote overlays should be printed

emerge --info
 * Overlay eclasses override eclasses from PORTDIR:
 * 
 *   '/usr/portage/local/layman/haskell/eclass/ghc-package.eclass'
 *   '/usr/portage/local/layman/haskell/eclass/haskell-cabal.eclass'
 * 
 * It is best to avoid overriding eclasses from PORTDIR because it will
 * trigger invalidation of cached ebuild metadata that is distributed with
 * the portage tree. If you must override eclasses from PORTDIR then you
 * are advised to add FEATURES="metadata-transfer" to /etc/make.conf and to
 * run `emerge --regen` after each time that you run `emerge --sync`. Set
 * PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you would like to
 * disable this warning.
Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-glibc2.2.5
Timestamp of tree: Thu, 12 Mar 2009 19:15:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo "
LANG="en_GB"
LC_ALL="en_GB.ISO-8859-15"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/pd-overlay /usr/portage/local/layman/enlightenment /usr/portage/local/layman/haskell /usr/portage/local/layman/lisp /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt cups dbus dri dvd emacs fftw flac fontconfig fortran gdbm gnutls gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg midi mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre perl png pppd python readline reflection session spell spl sse sse2 ssl svg sysfs tcpd tiff truetype unicode v4l vim-syntax vorbis wma x264 xinerama xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" USERLAND="GNU" VIDEO_CARDS="intel i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 William Roe 2009-03-13 17:04:47 UTC
Oh dear me. It works after deleting the cached xml file:
sudo rm /usr/portage/local/layman/cache_65bd38402ac8431067b54904bd2ed2d1.xml

Now laymen -L works fine. It must have been an incomplete download the overlays - could layman remove it's own cache xml file in these situations?
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-13 22:33:43 UTC
Gunnar, can you use this bug report for anything?
Comment 3 Robert Buchholz (RETIRED) gentoo-dev 2009-05-17 16:24:18 UTC
Probably some error in the web xml and not actually layman's fault.