I'm trying to revdep rebuild for specific library and see the following failure. It seems that revdep-rebuild handles the string "sci-mathematics/-MERGING-Macaulay2:0" as an atom resulting in portage failures. # revdep-rebuild --library libmpfr.so.1 * Configuring search environment for revdep-rebuild * Checking reverse dependencies * Packages containing binaries and libraries using libmpfr.so.1 * will be emerged. * Collecting system binaries and libraries * Generated new 1_files.rr * Checking dynamic linking [ 13% ] * found /usr/bin/M2 [ 53% ] * found /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1 * found /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1plus * found /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/f951 [ 100% ] * Generated new 3_broken.rr * Assigning files to packages * /usr/bin/M2 -> sci-mathematics/Macaulay2 * /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1 -> sys-devel/gcc * /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1plus -> sys-devel/gcc * /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/f951 -> sys-devel/gcc * Generated new 4_raw.rr and 4_owners.rr * Cleaning list of packages to rebuild * Generated new 4_pkgs.rr * Assigning packages to ebuilds * Generated new 4_ebuilds.rr * Evaluating package order Traceback (most recent call last): File "/usr/bin/portageq", line 637, in <module> main() File "/usr/bin/portageq", line 618, in main retval = function(args) File "/usr/bin/portageq", line 379, in best_visible mylist=portage.db[argv[0]]["porttree"].dbapi.match(argv[1]) File "/usr/lib/portage/pym/portage/dbapi/porttree.py", line 1102, in match return self.xmatch("match-visible", mydep) File "/usr/lib/portage/pym/portage/dbapi/porttree.py", line 997, in xmatch mydep = dep_expand(origdep, mydb=self, settings=self.settings) File "/usr/lib/portage/pym/portage/proxy/objectproxy.py", line 32, in __call__ return result(*args, **kwargs) File "/usr/lib/portage/pym/portage/dbapi/dep_expand.py", line 34, in dep_expand mydep = Atom(mydep) File "/usr/lib/portage/pym/portage/dep/__init__.py", line 573, in __init__ raise InvalidAtom(self) portage.exception.InvalidAtom: sci-mathematics/-MERGING-Macaulay2:0 * Generated new 5_order.rr * All prepared. Starting rebuild emerge --oneshot sci-mathematics/Macaulay2:0 sci-mathematics/-MERGING-Macaulay2:0 sys-devel/gcc:4.4 .......... !!! 'sci-mathematics/-MERGING-Macaulay2:0' is not a valid package atom. !!! Please check ebuild(5) for full details. * revdep-rebuild failed to emerge all packages. * you have the following choices: * - If emerge failed during the build, fix the problems and re-run revdep-rebuild. * - Use /etc/portage/package.keywords to unmask a newer version of the package. * (and remove 5_order.rr to be evaluated again) * - Modify the above emerge command and run it manually. * - Compile or unmerge unsatisfied packages manually, * remove temporary files, and try again. * (you can edit package/ebuild list first) * To remove temporary files, please run: * rm /var/cache/revdep-rebuild/*.rr Some notes: -) Running revdep-rebuild again after the failure, with the -) Does not happen in every run of revdep-rebuild -) Macaulay2 is from an overlay (science in this case) -) Have reproduced it with 0.3.0_rc10-r1 and 0.2.4.6.1-r1. -) The error occurs in stage 4, I think: denkmatte ~ # cat /var/cache/revdep-rebuild/4_owners.rr /usr/bin/M2 -> sci-mathematics/Macaulay2-1.3.1-r4 sci-mathematics/-MERGING-Macaulay2-1.2-r2 /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1 -> sys-devel/gcc-4.4.3-r2 /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1plus -> sys-devel/gcc-4.4.3-r2 /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/f951 -> sys-devel/gcc-4.4.3-r2 denkmatte ~ # cat /var/cache/revdep-rebuild/4_raw.rr sci-mathematics/Macaulay2-1.3.1-r4 sci-mathematics/-MERGING-Macaulay2-1.2-r2 sys-devel/gcc-4.4.3-r2 sys-devel/gcc-4.4.3-r2 sys-devel/gcc-4.4.3-r2 denkmatte ~ # cat /var/cache/revdep-rebuild/4_ebuilds.rr sci-mathematics/Macaulay2:0 sci-mathematics/-MERGING-Macaulay2:0 sys-devel/gcc:4.4 Reproducible: Sometimes # emerge --info Portage 2.1.8.3 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-gentoo-r4 i686) ================================================================= System uname: Linux-2.6.35-gentoo-r4-i686-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-gentoo-2.0.1 Timestamp of tree: Fri, 17 Sep 2010 10:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11 dev-lang/python: 2.6.5-r2, 3.1.2-r4 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0-r1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.5, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.3-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="*" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb" 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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" LINGUAS="en en_US de ja es fr it" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--timeout=300" 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="/var/lib/layman/sunrise /var/lib/layman/java-overlay /home/tom/tom-overlay /home/tom/gentoo/sci /home/tom/gentoo/sage-on-gentoo" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa anthy apache2 avahi bash-completion berkdb bluetooth branding bzip2 cairo cddb cdparanoia cdr cjk cli consolekit cracklib crypt ctype cups curl cxx daap dbus djvu dri dts dvd dvdr emacs encode exif expat fam fbcon ffmpeg firefox flac fortran ftp gd gdbm gif gimp glut gmp gnome gnome-keyring gnutls gpm graphviz gstreamer gtk guile hal hdaps iconv ieee1394 imagemagick imap imlib ipod ipv6 java javascript jpeg kde latex lcms ldap leim libnotify lm_sensors m17n-lib mad migemo mikmod mime mmx mng modules mp3 mp4 mpeg mplayer mudflap mule musicbrainz mysql mysqli ncurses nls nptl nptlonly nsplugin obex ocaml ogg oggvorbis openal opengl openmp pam pango pcmcia pcre pdf perl php plasma plotutils png policykit ppds pppd python qt3support qt4 readline reflection samba sasl sdl semantic-desktop session slang smartcard spell sqlite sqlite3 sse ssl startup-notification svg sysfs tcpd texlive theora threads tiff tk truetype uim unicode usb v4l v4l2 visualization vorbis wicd wifi win32codecs wxwindows x264 x86 xcb xcomposite xft xine xinerama xml xorg xulrunner xv xvid zeroconf zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="usb-dib0700" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US de ja es fr it" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Seems like the problem is in stage 3, actually, as it already exists in stage 4. Please attach (or paste the output of, if they're small) the stage 3 files.
(In reply to comment #1) > Seems like the problem is in stage 3, actually, as it already exists in stage > 4. Please attach (or paste the output of, if they're small) the stage 3 files. revdep-rebuild outputs the content of the 3_broken.rr during build. It is below "Assigning files to packages". For the records: # cat /var/cache/revdep-rebuild/3_broken.rr obj /usr/bin/M2 obj /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1 obj /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/cc1plus obj /usr/libexec/gcc/i686-pc-linux-gnu/4.4.3/f951 The 3_error.rr contains only the list of non-readable headers and no execution permissions. Nothing spectacular.
The problem is in the get_file_owners function with those MERGING entries existing in /var/db/pkg
Also, if you do an 'echo /var/db/pkg/*/*MER*' and manually remove the bad directories, it will fix the problem. I can fix revdep-rebuild to ignore any atoms that start with '-MERGING', but I would like it to output a warning message that invalid entries are present in /var/db/pkg so that they can be fixed.
Created attachment 248412 [details, diff] revdep-rebuild.338031.patch This patch will ignore the invalid -MERGING entries in /var/db/pkg. It applies to revdep-build in gentoolkit-0.2.4.6.1-r1 and gentoolkit-0.3.0_rc10-r1.
find -L /var/db/pkg -name '-*' -prune -o \( -type f -name CONTENTS \) -print0 | ... might be a little more efficient (although technically it will exclude categories starting with a - as well). As far as a warning goes, shouldn't that be portage's problem to give a warning when vdb has invalid files in it?
Released in gentoolkit-0.3.0_rc11