From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DMARC_MISSING, MAILING_LIST_MULTI,NICE_REPLY_A autolearn=unavailable autolearn_force=no version=4.0.0 Received: from sc.am (sc.am [66.247.109.82]) by chiba.3jane.net (Postfix) with SMTP id 79A66AC5D7 for ; Fri, 26 Jul 2002 14:58:34 -0500 (CDT) Received: (qmail 19142 invoked from network); 26 Jul 2002 20:00:08 -0000 Received: from unknown (HELO sc.am) (127.0.0.1) by 127.0.0.1 with SMTP; 26 Jul 2002 20:00:08 -0000 Received: from 12.247.253.40 (SquirrelMail authenticated user gregg) by sc.am with HTTP; Fri, 26 Jul 2002 15:00:08 -0500 (CDT) Message-ID: <2486.12.247.253.40.1027713608.squirrel@sc.am> Date: Fri, 26 Jul 2002 15:00:08 -0500 (CDT) Subject: Re: [gentoo-dev] new package notification From: "Gregg" To: In-Reply-To: <3D41A376.4060305@seul.org> References: <2155.12.247.253.40.1027701888.squirrel@sc.am> <200207261920.26542.arutha@gmx.de> <2317.12.247.253.40.1027709406.squirrel@sc.am> <3D41A376.4060305@seul.org> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: , Reply-To: gregg@sc.am X-Mailer: SquirrelMail (version 1.2.7) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux developer list List-Unsubscribe: , List-Archive: X-Archives-Salt: b8e7d163-fcef-428c-ba8f-8964821bfce9 X-Archives-Hash: a0835c8df5aedbec5cd6cdcf8b1c8aa7 With proxy's help on the forums we had this one already. Yours is cleaner and I like the color output. This one shows whats been removed also. Possiby you could merge that ability in as well? Gregg #!/bin/sh # directories in portage to ignore (not used yet) EXCLUDE="distfiles:files:eclass:licenses:profiles:scripts:metadata:packages" #check if this is first run if [ ! -f /var/cache/package.cache ] ; then echo "initializing package cache..." find /usr/portage/ -type d -mindepth 2 -maxdepth 2 | sort 2>/dev/null > /va$ else # move old cache (to compare to later) mv -f /var/cache/package.cache /var/cache/package.old 2>/dev/null # create new cache echo "Creating cache..." find /usr/portage/ -type d -mindepth 2 -maxdepth 2 | sort 2>/dev/null > /v$ echo "New:" diff /var/cache/package.old /var/cache/package.cache | grep \> echo echo "Removed:" diff /var/cache/package.old /var/cache/package.cache | grep \< echo echo "Done." fi > Gregg wrote: >> So... >> >> Something along these lines is in order: >> >> rm /root/before >> rm /root/after >> rm /root/new >> find /usr/portage -type d | grep -i -v files >/root/before >> emerge rsync >> find /usr/portage -type d | grep -i -v files >/root/after >> diff /root/before /root/after | tee /root/new >> >> >> That cleans up the old files, buids the before list, emerged, builds >> the after (both ignoring the files directory,) and then outputs the >> diff to screen and file > > good. This is a script based on your idea. > It it configurable and sends colorized output with package description > to the screen, while mainaining the log in the file. > The log file contains only /usr/portage/... files (no diff trash) > > The base directory is configurable (default /root) and the files > are called emerge-rsync.before|after|new. However I think it would be > better to store them somewhere in /var (/var/db/pkg/portage/... > /var/log) because I don't like messing in the home directory, > and if we are going to make it a system utility it should be > well integrated. > > Marko