While trying to run revdep-rebuild, I got an "Argument list too long" error from fgrep during the "Assigning files to ebuilds" stage. Could the script please be modified to take into account the large size of /var/db/pkg when almost all available ebuilds are installed on a system? Note: From /var/db/pkg: echo */*/CONTENTS > ~/contents produces a 170k file. Reproducible: Always Steps to Reproduce: 1. Emerge almost all ebuild available on a system. 2. Update at least one core package (SSL and postgresql are good ones) 3. Run revdep-rebuild Actual Results: "Assigning files to ebuilds.../usr/bin/revdep-rebuild: /bin/fgrep: /bin/sh: bad interpreter: Argument list too long" Expected Results: I don't know, I've never run this script successfully, having only found this script recently. Portage 2.0.49-r21 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.4.20-gentoo-r10) ================================================================= System uname: 2.4.20-gentoo-r10 i686 Unknown CPU Type Gentoo Base System version 1.4.3.12 distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/jakarta/tomcat/conf /opt/resin/conf /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/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -O3 -pipe" DISTDIR="/misc/portage/distfiles" FEATURES="autoaddcvs ccache cvs fixpackages sandbox usersandbox" GENTOO_MIRRORS="ftp://sunsite.ualberta.ca/pub/unix/Linux/gentoo/ ftp://ibiblio.org/pub/Linux/distributions/gentoo/ http://www.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://oss.redundant.com/pub/gentoo ftp://oss.redundant.com/pub/gentoo http://lug.mtu.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/misc/portage/packages" PORTAGE_TMPDIR="/home" PORTDIR="/misc/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="3dfx 3dnow 3ds S3TC X X509 Xaw3d aalib accounting acl acpi acpi4linux activefilter adns afs alsa amd antlr apache2 apm ardour-ksi arts artswrappersuid async athena atlas auctex autofs avantgo avi bcel berkdb bidi bindist bluetooth bonobo bsf bsh canna caps cdf cdr cgi chasen chroot cjk clamav clanJavaScript clanVoice clisp cmucl crypt cscope cups curl dedicated dga dillo directfb distribution dnd doc dv dvb dvd dvdr editor emacs emacs-w3 encode esd etdyn ethereal etwin evms2 evo exiscan exiscan-acl expat ext-png ext-zlib faad fam fastcgi fax fbcon fbdev ffmpeg fftw firebird flac flash fluidsynth foomaticdb foreign-package freetds freetype freewnn fs fusion gatos gb gcl gd gd-external gdbm geoip ggi ggz gif ginac glut gmtfull gmthigh gmtsuppl gmttria gnome gnomedb gnutls gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile hbci hdf hdf5 idea imagemagick imap imlib imlib2 innodb ipalias ipcs ipv6 irda irmc jabber jack jack-caps jack-tmpfs java javascript jbig jdepend jikes joystick jpeg js jsch junit justify jython kakasi kde kerberos krb4 ladcca lcd lcms ldap ldirectord leim libdsk libg++ libgd libgda libwww lids lirc lmtp log4j ltsp lua lucid lufsusermount mad maildir matroska mbox mcal md5sum mdb memlimit migemo mikmod milter mldonkeypango mmx mng mono motif mozaccess mozaccess-builtin mozcalendar mozctl mozilla mozinterfaceinfo mozirc mozp3p mozsvg mozxmlterm mpeg mpeg4 mpi msn mule mupad-noscilab music mysql nas ncurses neXt net netcdf nhc98 nls nocd nowin nptl nviz oav objc oci8 odbc offensive ofx oggvorbis oldworld openal opengl openssh opie oro oscar oskit-profiling ospfapi oss pam parse-clocks passfile pcap pda pdflib pear-db perl pg-hier pg-intdatetime pg-vacuumdelay php physfs pic plotutils png posgres postgres ppds prelude psyco pwdb python qhull qt qtmt quicktime radius rage128 readline regexp rhino rogue rplay ruby ruby18 samba sasl scanner sdk sdl server skey slang slp snmp socks5 sox speedo speex spell sqlite src sse ssl stencil-buffer stroke svga t1lib tcktk tcltk tcpd tcsim tetex tiff tools transcode transparent-proxy truetype type1 uml unicode usb v4l videos vim-with-x wmf wxwin wxwindows x86 xatrix xchattext xerces xface xfs xine xinerama xml xml2 xmms xosd xv xvid yahoo yaz zeo zlib zvbi video_cards_rage128"
*** Bug 67837 has been marked as a duplicate of this bug. ***
It worked a loooong time on my system. I have also lots of packages (Kuroo says 2340/19401). But I updated lots of packages during 1-1/2 months, without doing revdep-rebuild... now I also have this error. Here my output: ----------8<---------- # revdep-rebuild -p Checking reverse dependencies... Packages containing binaries and libraries broken by any package update, will be recompiled. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... ldd: warning: you do not have execution permission for `/usr/lib/tcl/tclrrd1.2.6/tclrrd1.2.6.so' broken /usr/lib/tcl/tclrrd1.2.6/tclrrd1.2.6.so (requires librrd.so.0) broken /usr/lib/xine/plugins/1.0.0/xineplug_inp_vcdx.so (requires libvcd.so.0) broken /usr/sbin/sensord (requires librrd.so.0) ldd: warning: you do not have execution permission for `/usr/X11R6/lib/tcl/tclrrd1.2.6/tclrrd1.2.6.so' broken /usr/X11R6/lib/tcl/tclrrd1.2.6/tclrrd1.2.6.so (requires librrd.so.0) broken /usr/X11R6/lib/xine/plugins/1.0.0/xineplug_inp_vcdx.so (requires libvcd.so.0) broken /usr/X11R6/sbin/sensord (requires librrd.so.0) broken /opt/opera/lib/opera/plugins/operamotifwrapper-1 (requires libXm.so.1) broken /opt/racer-bin/bin/gplex (requires libfmod-3.5.so) broken /opt/racer-bin/bin/racer (requires libfmod-3.61.so) broken /opt/racer-bin/bin/carlab (requires libfmod-3.61.so) broken /opt/racer-bin/bin/modeler (requires libfmod-3.5.so) broken /opt/racer-bin/bin/tracked (requires libfmod-3.61.so) broken /opt/racer-bin/bin/pacejka (requires libfmod-3.61.so) done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds.../usr/bin/revdep-rebuild: line 252: /bin/fgrep: Argument list too long done. (/root/.revdep-rebuild.4_ebuilds) Evaluating package order... done. (/root/.revdep-rebuild.5_order) Dynamic linking on your system is consistent... All done. ----------8<---------- I'll try reemerging the few packages I can see here, but then.... what?
Well, I replaced fgrep -l -f - */*/CONTENTS with fgrep -l -f - [a-m]*/*/CONTENTS fgrep -l -f - [n-z]*/*/CONTENTS in /usr/bin/revdep-rebuild at line 253. It seems to work.
Created attachment 61317 [details, diff] one way of fixing this This should fix things. However, I'm not sure if <(...) will work on all systems, since the bash manpage explains that it's only supported on systems where /dev/fd/# is available. Is this available on all Gentoo systems?
Created attachment 61318 [details, diff] better way of fixing this Previous patch probably still wouldn't work right, thinking about it some more (since I don't have so many packages, I could only test if it didn't break my system where normal revdep-rebuild works). This one should actually work.
*** Bug 97038 has been marked as a duplicate of this bug. ***
*** Bug 111712 has been marked as a duplicate of this bug. ***
I experience something similar with this command, taken straight from the revdep-rebuild man page: $ sudo env SEARCH_DIRS="/ -*" SEARCH_DIRS_MASK="/mnt /home" revdep-rebuild Configuring search environment for revdep-rebuild Checking reverse dependencies... Packages containing binaries and libraries broken by a package update will be emerged. Collecting system binaries and libraries... done. (/home/sruggier/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/home/sruggier/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... /usr/bin/revdep-rebuild: line 369: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 371: /bin/cat: Argument list too long done. (/home/sruggier/.revdep-rebuild.3_rebuild) Assigning files to ebuilds... Nothing to rebuild Evaluating package order.../usr/bin/revdep-rebuild: line 533: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 533: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 533: /bin/tr: Argument list too long done. (/home/sruggier/.revdep-rebuild.5_order) /usr/bin/revdep-rebuild: line 558: /bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 558: /bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 558: /bin/tr: Argument list too long Dynamic linking on your system is consistent... All done. /usr/bin/revdep-rebuild: line 566: /bin/rm: Argument list too long /usr/bin/revdep-rebuild: line 567: /bin/rm: Argument list too long
Also check out bug 118394: I've submitted a small patch that fixes the problem for my system and it applies cleanly to stable and unstable. Anyone interested in closing this sucker once and for all? ;-)
*** Bug 118394 has been marked as a duplicate of this bug. ***
I occard some error of #8 --begin Configuring search environment for revdep-rebuild Environment mismatch from previous run, deleting temporary files... Checking reverse dependencies... Packages containing binaries and libraries broken by a package update will be emerged. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... /usr/bin/revdep-rebuild: line 369: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 371: /usr/bin/cat: Argument list too long done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds... Nothing to rebuild Evaluating package order.../usr/bin/revdep-rebuild: line 530: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 530: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 530: /usr/bin/tr: Argument list too long done. (/root/.revdep-rebuild.5_order) /usr/bin/revdep-rebuild: line 555: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 555: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 555: /usr/bin/tr: Argument list too long Dynamic linking on your system is consistent... All done. /usr/bin/revdep-rebuild: line 563: /usr/bin/rm: Argument list too long /usr/bin/revdep-rebuild: line 564: /usr/bin/rm: Argument list too long -- end -- so I check many file about revdep-rebuild and I found a lot of /usr/lib/eclipse-3/plugins/* argument in ~/.revdep-rebuild.2_ldpath file. It is eclipse's plugin directory but I not need check by revdep-rebuild so I write /etc/revdep-rebuild/mask-eclipse (mask-eclipse named by me) --begin SEARCH_DIRS_MASK="/usr/lib/eclipse-3" --end revdep-rebuild act exactly.
*** Bug 135371 has been marked as a duplicate of this bug. ***
*** Bug 106056 has been marked as a duplicate of this bug. ***
Doh... I submitted Bug 135371 Which is definately a duplicate. Umm... why is this patch not in gentoolkit yet?
I have also this error (Assigning files to ebuilds.../usr/bin/revdep-rebuild: line 567: /bin/fgrep: Argument list too long) on my amd64-system (porthole shows 1744 installed packages) for several weeks. On all other non-amd64-systems with partly more installed packages I never had this error. I can't apply the patch above, it does not fit to my /usr/bin/emerge (gentoolkit-0.2.2). root@grizzly:/root(10)# emerge --info Portage 2.1.1_pre1-r1 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-hardened, glibc-2.4-r3, 2.6.17 x86_64) ================================================================= System uname: 2.6.17 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.1 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=k8" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://gd.tuwien.ac.at/opsys/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://ftp.easynet.nl/mirror/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/" LINGUAS="de fr" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X Xaw3d a52 aac alsa ao aotuv apache2 asf atlas auctex audiofile automount avi berkdb bitmap-fonts blas bonobo bzip2 cairo cdda cddb cdio cdparanoia cdr cgi cli corba crypt cups curl daap dbus devmap dga dlloader dri dvb dvd dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo evolution exif expat fam fame ffmpeg fftw fits flac fltk foomaticdb fortran fpx gdal geos gif gimp ginac glade gml gmp gnome gnuplot gphoto2 gpm graphviz grass gs gsl gsm gstreamer gtk gtk2 guile hal hardened hddtemp hdf hdf5 hlapi icq id3 imagemagick imlib innodb ipv6 isdnlog jabber jbig jp2 jpeg jpeg2 kde kexi lame lapack latex lcms ldap libgda libsamplerate lirc lm_sensors lzo lzw lzw-tiff math matroska mng mod mono mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mp4live mpeg mpeg2 mplayer musicbrainz mysql mysqli nautilus ncurses netcdf network nfs nls nntp nptl nptlonly numarray numeric ocaml octave odbc ogdi opengl pam pcre pdf pdflib perl plotutils png posix postgres pppd proj python qhull qt quicktime readline reflection reiserfs rhythmbox rle rrdcgi rrdtool samba sdl session slang slp sndfile snmp sox spell spl sqlite ssl subtitles svg t1lib tcltk tcpd tetex theora tidy tiff truetype-fonts type1-fonts unicode usb v4l2 video_cards_radeon wmf xemacs xext xine xml2 xmlreader xmlrpc xorg xpm xv xvid xvmc zlib zvbi elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de linguas_fr userland_GNU video_cards_vesa video_cards_fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Is there any hint to bypass this error? Regards Juergen
Same problem here, using gentoolkit 0.2.2 :( Please fix it Thanks a lot
Created attachment 91167 [details, diff] revdep-rebuild.38751.patch Updated patch for gentoolkit-0.2.2 that is in subversion r304
ON AMD64, and after applying revdep-rebuild.38751.patch, I get: # revdep-rebuild -av Configuring search environment for revdep-rebuild Checking reverse dependencies... Packages containing binaries and libraries broken by a package update will be emerged. Collecting system binaries and libraries... done. (/root/.revdep-rebuild.1_files) Collecting complete LD_LIBRARY_PATH... done. (/root/.revdep-rebuild.2_ldpath) Checking dynamic linking consistency... /usr/bin/revdep-rebuild: line 402: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 404: /bin/egrep: Argument list too long /usr/bin/revdep-rebuild: line 404: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 450: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 450: /bin/egrep: Argument list too long done. (/root/.revdep-rebuild.3_rebuild) Assigning files to ebuilds... Nothing to rebuild Evaluating package order.../usr/bin/revdep-rebuild: line 580: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 580: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 580: /usr/bin/tr: Argument list too long done. (/root/.revdep-rebuild.5_order) /usr/bin/revdep-rebuild: line 620: /usr/bin/cat: Argument list too long /usr/bin/revdep-rebuild: line 620: /usr/bin/sed: Argument list too long /usr/bin/revdep-rebuild: line 620: /usr/bin/tr: Argument list too long Dynamic linking on your system is consistent... All done. /usr/bin/revdep-rebuild: line 628: /usr/bin/rm: Argument list too long /usr/bin/revdep-rebuild: line 629: /usr/bin/rm: Argument list too long
gentoolkit-0.2.3_pre1 seems fix the problem for me
*** Bug 149185 has been marked as a duplicate of this bug. ***
*** Bug 149347 has been marked as a duplicate of this bug. ***
Released with gentoolkit-0.2.3_pre1
*** Bug 137313 has been marked as a duplicate of this bug. ***
Fixed in gentoolkit-0.2.3