The equery tool should be enhanced by two new options: --very-silent: does not output any text besides the package names in list mode. --strip-version: local option for list mode; strips any version information from the package name (sys-kernel/gentoo-sources-2.6.13-r5 becomes sys-kernel/gentoo-sources) this way with --very-silent and --strip-version combined one could use the output from equery l to pipe it to other commands, e.g equery --very-silent l --strip-version | xargs emerge -u Reproducible: Always Steps to Reproduce:
Check qlist --installed --nocolor You can get qlist by emerging portage-utils. equery --very-silent l --strip-version | xargs emerge -u Well this is probably just a bad example but this particular case would be achieved by just emerge -uD
Are you sure? AFAIK emerge -uD does only take packages from the world file into account whereas equery l lists every package. At least the good old "qpkg -I -nc | xargs emerge -uD" did find more packages to update than emerge -uD world, that I'm sure!
(In reply to comment #2) > Are you sure? AFAIK emerge -uD does only take packages from the world file into > account whereas equery l lists every package. > Didn't think about that. You could be right.
(In reply to comment #0) > The equery tool should be enhanced by two new options: > > --very-silent: does not output any text besides the package names in list mode. > --strip-version: local option for list mode; strips any version information from > the package name (sys-kernel/gentoo-sources-2.6.13-r5 becomes > sys-kernel/gentoo-sources) > I think the --strip-version option would be very useful to have in equery. I've encountered a corrupt /var/lib/portage/world file and neither of the options given in the FAQ work http://forums.gentoo.org/viewtopic-t-136627.html and its a bit of a pain in the proverbial to strip out the versions (although it is improving my knowledge and understanding of regex's ;-).
$ equery --quiet list gcc sys-devel/gcc-4.3.4:4.3 $ equery --quiet list gcc --format '$cp' sys-devel/gcc Passing --quiet to equery has made it quite quiet in all the 0.3.0_rcs. The new --format option available on list and hasuse is as yet undocumented[1] but very powerful and lets you get just about any piece of info you could want and also combine them. $ equery --quiet list gcc --format '$cp-$fullversion ($slot)' sys-devel/gcc-4.3.4 (4.3) It will be released in the next rc. [1] bug #307949
This is fixed in gentoolkit-0.3.0_rc10 with the --format option added in bug 307949. However the --format option is still undocumented. For the example listed the following command does what you want: equery -q list '*' --format '$cp' | xargs emerge -pu