Gentoo Archives: gentoo-user

From: Peter Ruskin <Peter.Ruskin@×××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Heads-Up sys-lib/com_err breaks Apps
Date: Sat, 09 Jul 2005 11:27:56
Message-Id: 200507091221.50691.Peter.Ruskin@dsl.pipex.com
In Reply to: Re: [gentoo-user] Heads-Up sys-lib/com_err breaks Apps by Roy Wright
1 On Friday 08 July 2005 16:56, Roy Wright wrote:
2 > Here's a perl script to display the einfo lines of packages to
3 > be merged. Just run it with the same options you will use for
4 > emerge. Example:
5 >
6 > einfo -uDN world >einfo.txt
7 > emerge -uDN world
8 > less einfo.txt
9 >
10 > You will probably want to save the output to refer to after
11 > emerging.
12 >
13 > Enjoy,
14 > Roy
15 >
16 > #!/usr/bin/perl
17 >
18 > # this script will run emerge with the given command line options
19 > plus # "--pretend". It will then grep all of the packages to be
20 > merged looking # for einfo lines to display.
21 >
22 > $portage = '/usr/portage';
23 > $emerge = "emerge @ARGV --pretend";
24 >
25 > open(EMERGE, "$emerge|") || die "unable to open $emerge\n";
26 > while(<EMERGE>) {
27 > if(/\[[^\]]+\]\s+(\S+)\/(\S+)\-(\d\S*)\s/) {
28 > findInfo($1,$2,$3);
29 > }
30 > }
31 > close(EMERGE);
32 >
33 > exit 0;
34 >
35 > sub findInfo
36 > {
37 > local ($package,$name,$ver) = @_;
38 > local $pkgDir = "$portage/$package/$name";
39 > local $ebuild = "$pkgDir/$name-$ver.ebuild";
40 > print "$ebuild\n";
41 > if(-T $ebuild) {
42 > open(EBUILD, "<$ebuild") || warn "unable to read
43 > $ebuild\n"; while(<EBUILD>) {
44 > if(/(einfo.*)$/) {
45 > print " $1\n";
46 > }
47 if(/(ewarn.*)$/) {
48 print " $1\n";
49 }
50 if(/(eerror.*)$/) {
51 print " $1\n";
52 }
53 > }
54 > close(EBUILD);
55 > }
56 > print "\n";
57 > }
58 >
59 Thanks, nice script Roy. With the ewarn and eerror additions above
60 you get even more information.
61
62 I use the following in root's crontab:
63 # sync Gentoo nightly and check for updates
64 0 0 * * 1-6 /usr/sbin/esync -ns && /usr/bin/update-eix -q
65 && /usr/bin/emerge world -uNvplt && /usr/local/bin/einfo -uN world
66 # sync Gentoo weekly and check (deep) for updates
67 0 0 * * 7 /usr/sbin/esync -ns && /usr/bin/update-eix -q
68 && /usr/bin/emerge world -uNDvtpl && /usr/local/bin/einfo -uND
69 world
70
71 --
72 Peter
73 ========================================================================
74 Gentoo Linux: Portage 2.0.51.19. kernel-2.6.12-gentoo.
75 i686 AMD Athlon(tm) XP 3200+. gcc(GCC): 3.3.5-20050130.
76 KDE: 3.4.1. Qt: 3.3.4.
77 ========================================================================
78 --
79 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>