From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5055 invoked by uid 1002); 17 Aug 2003 13:34:17 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 25641 invoked from network); 17 Aug 2003 13:34:17 -0000 From: Dewet Diener To: gentoo-dev@gentoo.org Date: Sun, 17 Aug 2003 15:34:24 +0200 User-Agent: KMail/1.5.3 References: <1061113519.8012.9.camel@biproc> <200308170406.53791.klasikahl@gentoo.org> <20030817071709.5911ce4f.weeve@gentoo.org> In-Reply-To: <20030817071709.5911ce4f.weeve@gentoo.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_gR4P/NYHCT1q9Wc" Message-Id: <200308171534.24819.gentoo@dewet.org> Subject: Re: [gentoo-dev] New feature proposition (make.conf) X-Archives-Salt: 0cbb7c28-38ed-44a3-82ad-d7d1cbe7974c X-Archives-Hash: b205770b22d6c57036aa91ecbaccaf65 --Boundary-00=_gR4P/NYHCT1q9Wc Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 17 August 2003 13:17, Jason Wever wrote: > My thought is rather than remove the distfiles for the version you > are building, remove the distfiles for versions that have just been > uninstalled by clean or update (granted they aren't being used by > the new version as well). This way you only have the distfiles for > what's currently on your system. Someone posted this to the list way back. I'm still using it with good=20 results to keep my distfiles directory fairly trim; its just a simple=20 shell script to delete old, unused distfiles. Regards, Dewet =2D-=20 Dewet Diener http://dewet.org Professional Student, avid Gentoo user :) Stellenbosch, South Africa (33=BA 55" 58.80'S 18=BA 51" 00.00'E) --Boundary-00=_gR4P/NYHCT1q9Wc Content-Type: application/x-shellscript; name="distfiles-clean" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="distfiles-clean" #!/bin/sh # # distfiles-clean # # Cleans unused files from Portage's distfiles directory. # # Jos=E9 Fonseca PROGRAM=3D`basename "$0"` while [ ${#} -gt 0 ] do case "$1" in -h|--help) USAGE=3Dy break ;; -i|--ignore) IGNORE=3D"$IGNORE $2" shift 2 ;; -I|--ignore-file) IGNORE=3D"$IGNORE `cat "$2"`" shift 2 ;; -p|--pretend) PRETEND=3Dy shift ;; *) echo "$PROGRAM: Invalid option \'$1\'" 1>&2 USAGE=3Dy break ;; esac done # For PORTDIR and DISTDIR =2E /etc/make.globals =2E /etc/make.conf if [ "$USAGE" ] then echo "Usage: $PROGRAM [-h|--help] [-i|--ignore ] [-I|--ignore-file <= globfile>] [-p|--pretend]" echo "Cleans unused files from $DISTDIR directory." exit fi DBDIR=3D/var/db/pkg CACHEDIR=3D/var/cache/edb/dep for DIR in "$PORTDIR" "$DISTDIR" "$DBDIR" "$CACHEDIR" do if [ ! -d "$DIR" ] then echo "$PROGRAM: \'$DIR\' not found." exit fi done TMPFILE=3D`mktemp /tmp/$PROGRAM.XXXXXX` cd "$DISTDIR" { echo "cvs-src" [ "$IGNORE" ] && ls -1d $IGNORE find "$DBDIR" -name '*.ebuild' | sed -n -e "s:^$DBDIR/\([^/]*\)/\([^/]*\)/= \([^/]*\)\.ebuild$:$CACHEDIR/\1/\3:p" | xargs sed -s -e '4!d;/^$/d;s/[[:aln= um:]]\+?\|(\|)//g;s/\<[^[:space:]]\+\/\ "$TMPFILE" && ls -1 | comm -23 - "$TMPFILE" | { if [ "$PRETEND" ] then cat else xargs rm -f fi } rm "$TMPFILE" --Boundary-00=_gR4P/NYHCT1q9Wc Content-Type: text/plain; charset=us-ascii -- gentoo-dev@gentoo.org mailing list --Boundary-00=_gR4P/NYHCT1q9Wc--