Here's a perl script to display the einfo lines of packages to
be merged. Just run it with the same options you will use for
emerge. Example:
einfo -uDN world >einfo.txt
emerge -uDN world
less einfo.txt
You will probably want to save the output to refer to after
emerging.
Enjoy,
Roy
#!/usr/bin/perl
# this script will run emerge with the given command line options plus
# "--pretend". It will then grep all of the packages to be merged looking
# for einfo lines to display.
$portage = '/usr/portage';
$emerge = "emerge @ARGV --pretend";
open(EMERGE, "$emerge|") || die "unable to open $emerge\n";
while(<EMERGE>) {
if(/\[[^\]]+\]\s+(\S+)\/(\S+)\-(\d\S*)\s/) {
findInfo($1,$2,$3);
}
}
close(EMERGE);
exit 0;
sub findInfo
{
local ($package,$name,$ver) = @_;
local $pkgDir = "$portage/$package/$name";
local $ebuild = "$pkgDir/$name-$ver.ebuild";
print "$ebuild\n";
if(-T $ebuild) {
open(EBUILD, "<$ebuild") || warn "unable to read $ebuild\n";
while(<EBUILD>) {
if(/(einfo.*)$/) {
print " $1\n";
}
}
close(EBUILD);
}
print "\n";
}
Ow Mun Heng wrote:
>Perhaps a good thing would be when the emerge -uDpv world output can be
>formatted to include einfo messages, or rather include "ecriticalinfo"
>outputs. (Just like IIRC updating portage will make that happen.)
>
>Now, that would be a feature worth having.
>
>
--
[email protected] mailing list