Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 334265 - repoman from portage-2.2_rc68 crash when metadata.xml <herd> tag is empty
Summary: repoman from portage-2.2_rc68 crash when metadata.xml <herd> tag is empty
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 335925
  Show dependency tree
 
Reported: 2010-08-24 11:32 UTC by Guillaume Castagnino
Modified: 2010-09-04 07:54 UTC (History)
1 user (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 Guillaume Castagnino 2010-08-24 11:32:00 UTC
When metadata.xml contains an empty <herd> tag, repoman 2.2_rc68 crash.
With version 2.2_rc67 it does not crash.

Of course it's an invalid metadata, but it should print an error, not crash ;)

Here is the backtrace :
$ grep herd metadata.xml
        <herd></herd>

$ repoman -p full

RepoMan does a once-over of the neighborhood...
Traceback (most recent call last):
  File "/usr/bin/repoman", line 1369, in <module>
    utilities.check_metadata(_metadata_xml, herd_base)
  File "/usr/lib64/portage/pym/repoman/utilities.py", line 154, in check_metadata
    check_metadata_herds(xml_tree, herd_base)
  File "/usr/lib64/portage/pym/repoman/utilities.py", line 146, in check_metadata_herds
    (e.text.strip() for e in herd_nodes)
  File "/usr/lib64/portage/pym/repoman/utilities.py", line 146, in <genexpr>
    (e.text.strip() for e in herd_nodes)
AttributeError: 'NoneType' object has no attribute 'strip'




If <herd> contains even only a single space, it's fine :
$ grep herd metadata.xml
        <herd> </herd>

$ repoman -p full

RepoMan does a once-over of the neighborhood...
  ebuild.allmasked              1
   net-misc/netmask
  metadata.bad                  1
   net-misc/netmask/metadata.xml: Unknown herd ""

Note: use --include-dev (-d) to check dependencies for 'dev' profiles

Please fix these important QA issues first.
RepoMan sez: "Make your QA payment on time and you'll never see the likes of me."





Here is the emerge --info :

# emerge --info portage
Portage 2.2_rc68 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35-tatooine-r2 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.35-tatooine-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L9400_@_1.86GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 24 Aug 2010 09:00:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.2
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /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/portage /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests buildsyspkg collision-protect distlocks fixlafiles fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://mirror.switch.ch/mirror/gentoo/     http://trumpetti.atm.tut.fi/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.tiscali.nl/"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common"
LINGUAS="fr"
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/local/portage/gcpan-portage /usr/local/portage/local-portage /var/lib/layman/xwing"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi additions alsa amd64 asf async audiofile bash-completion branding bzip2 cairo cdinstall cdr cli clucene consolekit cracklib crypt cups curl cxx dbus deltimeshiftrec dga distribution dnd dri dts dv dvb dvdnav editor embedded emboss encode exif extensions extras faad fbcon ffmpeg firefox firefox3 flac fontconfig fortran fr gif gimp gpm gtk iconv idled idn imagemagick imap iproute2 ipv6 irc ithreads jabber jpeg jpeg2k kde kipi kqemu laptop lcms live livebuffer llvm lzma mad maildir matroska md5sum mmx mng modules mozdevelop mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack ncurses network nls nptl nptlonly nsplugin ofx ogg opengl openmp openssl pam pango pcre pdf perl php pic png pppd print qt3support qt4 raster rdesktop rdp readline reflection sasl scanner semantic-desktop session soap sockets spell spl sse sse2 ssl startup-notification svg sysfs syslog tcpd theora threads tiff truetype unicode usb v4l v4l2 vim-pager vim-syntax vlm vnc vorbis windeco wmf x264 xcb xcomposite xforms xml xorg xulrunner xv xvid xvmc yaepg zip zlib" ALSA_CARDS="hda-intel" 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 auth_digest authn_dbd authn_default      authn_file authz_default authz_groupfile authz_host authz_owner authz_user     autoindex dbd deflate dir env expires filter log_config mime mime_magic     negotiation rewrite setenvif status" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi     gzip limit_req limit_zone map memcached proxy realip referer rewrite     upstream_ip_hash userid stub_status" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.2_rc68 was built with the following:
USE="(multilib) -build -doc -epydoc -python3 (-selinux)" LINGUAS="-pl"
Comment 2 Guillaume Castagnino 2010-08-24 19:10:56 UTC
great job, thanks !
Comment 3 Zac Medico gentoo-dev 2010-08-24 21:10:26 UTC
This is fixed in 2.2_rc69, but I'll leave this bug open until it's in an unmasked release.
Comment 4 Zac Medico gentoo-dev 2010-09-04 07:54:01 UTC
This is fixed in 2.1.9.