Gentoo Archives: gentoo-user

From: Roy Wright <royw@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Heads-Up sys-lib/com_err breaks Apps
Date: Fri, 08 Jul 2005 16:05:50
Message-Id: 42CEA218.5050907@cisco.com
In Reply to: Re: [gentoo-user] Heads-Up sys-lib/com_err breaks Apps by Ow Mun Heng
1 Here's a perl script to display the einfo lines of packages to
2 be merged. Just run it with the same options you will use for
3 emerge. Example:
4
5 einfo -uDN world >einfo.txt
6 emerge -uDN world
7 less einfo.txt
8
9 You will probably want to save the output to refer to after
10 emerging.
11
12 Enjoy,
13 Roy
14
15 #!/usr/bin/perl
16
17 # this script will run emerge with the given command line options plus
18 # "--pretend". It will then grep all of the packages to be merged looking
19 # for einfo lines to display.
20
21 $portage = '/usr/portage';
22 $emerge = "emerge @ARGV --pretend";
23
24 open(EMERGE, "$emerge|") || die "unable to open $emerge\n";
25 while(<EMERGE>) {
26 if(/\[[^\]]+\]\s+(\S+)\/(\S+)\-(\d\S*)\s/) {
27 findInfo($1,$2,$3);
28 }
29 }
30 close(EMERGE);
31
32 exit 0;
33
34 sub findInfo
35 {
36 local ($package,$name,$ver) = @_;
37 local $pkgDir = "$portage/$package/$name";
38 local $ebuild = "$pkgDir/$name-$ver.ebuild";
39 print "$ebuild\n";
40 if(-T $ebuild) {
41 open(EBUILD, "<$ebuild") || warn "unable to read $ebuild\n";
42 while(<EBUILD>) {
43 if(/(einfo.*)$/) {
44 print " $1\n";
45 }
46 }
47 close(EBUILD);
48 }
49 print "\n";
50 }
51
52
53 Ow Mun Heng wrote:
54
55 >Perhaps a good thing would be when the emerge -uDpv world output can be
56 >formatted to include einfo messages, or rather include "ecriticalinfo"
57 >outputs. (Just like IIRC updating portage will make that happen.)
58 >
59 >Now, that would be a feature worth having.
60 >
61 >
62 --
63 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Heads-Up sys-lib/com_err breaks Apps Peter Ruskin <Peter.Ruskin@×××××××××.com>