Gentoo Archives: gentoo-dev

From: Gregg <gregg@××.am>
To: marko@××××.org
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] new package notification
Date: Fri, 26 Jul 2002 15:01:30
Message-Id: 2491.12.247.253.40.1027713784.squirrel@sc.am
In Reply to: Re: [gentoo-dev] new package notification by Marko Mikulicic
1 Also, as per my last email with the other script that was being worked on.
2 Ive noticed that the find in that one is faster because of the min and
3 max depth settings. These 2 seem to be perfect for merging together then
4 having exactly what we want, with it being quick and easy.
5
6 Gregg
7
8 > (sorry for posting this message on a new thread but
9 > I had some problems with the headers of the original message)
10 >
11 > Gregg wrote:
12 > > So...
13 > >
14 > > Something along these lines is in order:
15 > >
16 > > rm /root/before
17 > > rm /root/after
18 > > rm /root/new
19 > > find /usr/portage -type d | grep -i -v files >/root/before
20 > > emerge rsync
21 > > find /usr/portage -type d | grep -i -v files >/root/after
22 > > diff /root/before /root/after | tee /root/new
23 > >
24 > >
25 > > That cleans up the old files, buids the before list, emerged, builds
26 > the after (both ignoring the files directory,) and then outputs the
27 > diff to screen and file
28 >
29 > good. This is a script based on your idea.
30 > It it configurable and sends colorized output with package description
31 > to the screen, while mainaining the log in the file.
32 > The log file contains only /usr/portage/... files (no diff trash)
33 >
34 > The base directory is configurable (default /root) and the files
35 > are called emerge-rsync.before|after|new. However I think it would be
36 > better to store them somewhere in /var (/var/db/pkg/portage/...
37 > /var/log) because I don't like messing in the home directory,
38 > and if we are going to make it a system utility it should be
39 > well integrated.
40 >
41 > Marko
42 >
43 > script (cannot send attachments):
44 > <snip>
45 > !/bin/sh
46 > BASE=/root
47 > USE_COLORS=yes
48 >
49 > # end user configuration section
50 >
51 > BEFORE=$BASE/ebuild-rsync.before
52 > AFTER=$BASE/ebuild-rsync.after
53 > NEW=$BASE/ebuild-rsync.new
54 >
55 > if [ "$USE_COLORS" == "yes" ]; then
56 > GREEN="\033[;32m"
57 > NORMAL="\033[m"
58 > fi
59 >
60 > find /usr/portage -type d | grep -i -v files >$BEFORE
61 > emerge rsync
62 > find /usr/portage -type d | grep -i -v files >$AFTER
63 > diff $BEFORE $AFTER | grep /usr/portage | sed "s/> //g" > $NEW
64 >
65 > # cleanup
66 > rm $BEFORE $AFTER
67 >
68 > # display
69 > echo
70 > echo New ebuilds:
71 > for i in $(cat $NEW); do
72 > . $(ls $i/*.ebuild --sort=time | head -n 1)
73 >
74 > echo -e $GREEN${i##/usr/portage/}$NORMAL: $DESCRIPTION
75 > done
76 >
77 > </snip>
78 >
79 >
80 >
81 >
82 > _______________________________________________
83 > gentoo-dev mailing list
84 > gentoo-dev@g.o
85 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev

Replies

Subject Author
Re: [gentoo-dev] new package notification Marko Mikulicic <marko@××××.org>