From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18233 invoked by uid 1002); 12 Nov 2002 11:48:40 -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 18223 invoked from network); 12 Nov 2002 11:48:39 -0000 From: William Kenworthy To: =?ISO-8859-1?Q?Jos=E9?= Fonseca Cc: Nick Jones , gentoo-dev List In-Reply-To: <20021112102144.GA20309@localhost.localdomain> References: <20021111203828.GA10784@localhost.localdomain> <200211120042.41107.joba123@arcor.de> <20021112011310.GB27162@localhost.localdomain> <3DD0610F.1060902@seul.org> <20021111212849.A23035@twobit.net> <20021112102144.GA20309@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.8 Date: 12 Nov 2002 19:28:35 +0800 Message-Id: <1037100515.10897.4.camel@rattus.localdomain> Mime-Version: 1.0 Subject: Re: [gentoo-dev] Script to clean old files from /usr/portage/distfiles X-Archives-Salt: 3cb15fd7-2d52-44a2-9e5c-54e790e8c87a X-Archives-Hash: c025d9d2d634defd3f5def57d569bd90 I get the messages below before the duplicates after running with the -p flag. Is there a way to ensure the cache is up-to-date and clean before running? =20 BillK sed: can't read /var/cache/edb/dep/app-admin/metalog-0.6-r9: No such file or directory sed: can't read /var/cache/edb/dep/x11-themes/crux-1.9.3: No such file or directory sed: can't read /var/cache/edb/dep/x11-themes/gtk-thinice-engine-2.0.1: No such file or directory sed: can't read /var/cache/edb/dep/gnome-base/libgnome-2.0.1-r1: No such file or directory sed: can't read /var/cache/edb/dep/gnome-base/ORBit2-2.4.0-r2: No such file or directory sed: can't read /var/cache/edb/dep/app-arch/rpm-4.0.4-r2: No such file or directory sed: can't read /var/cache/edb/dep/app-text/ispell-3.2.06-r1: No such file or directory sed: can't read /var/cache/edb/dep/app-text/gnome-spell-0.4.1-r1: No such file or directory sed: can't read /var/cache/edb/dep/sys-devel/gcc-3.1.1-r1: No such file or directory sed: can't read /var/cache/edb/dep/sys-devel/make-3.79.1-r3: No such file or directory sed: can't read /var/cache/edb/dep/sys-devel/perl-5.6.1-r4: No such file or directory sed: can't read /var/cache/edb/dep/net-www/lynx-2.8.4a-r4: No such file or directory sed: can't read /var/cache/edb/dep/media-libs/lcms-1.08: No such file or directory sed: can't read /var/cache/edb/dep/sys-apps/hdparm-5.2: No such file or directory sed: can't read /var/cache/edb/dep/sys-apps/gawk-3.1.0-r2: No such file or directory sed: can't read /var/cache/edb/dep/sys-libs/pam-0.75-r6: No such file or directory sed: can't read /var/cache/edb/dep/sys-libs/glibc-2.2.5-r4: No such file or directory sed: can't read /var/cache/edb/dep/dev-libs/libsigc++-1.1.13: No such file or directory sed: can't read /var/cache/edb/dep/dev-libs/libxslt-1.0.18: No such file or directory sed: can't read /var/cache/edb/dep/dev-libs/expat-1.95.2: No such file or directory sed: can't read /var/cache/edb/dep/media-sound/sox-12.17.3: No such file or directory sed: can't read /var/cache/edb/dep/media-sound/ecasound-2.0.4: No such file or directory sed: can't read /var/cache/edb/dep/media-video/nvidia-kernel-1.0.2960: No such file or directory sed: can't read /var/cache/edb/dep/gnome-extra/gtkhtml-1.0.2-r2: No such file or directory sed: can't read /var/cache/edb/dep/gnome-extra/gal2-0.0.4-r1: No such file or directory sed: can't read /var/cache/edb/dep/net-dialup/ppp-2.4.1-r8: No such file or directory 4.2.0-libGLU-bad-extern.patch 4.2.0-xlib-i18n-module.patch 4.2.0-zlib-security.patch ExtUtils-F77-1.13.tar.gz On Tue, 2002-11-12 at 18:21, Jos=E9 Fonseca wrote: > On Mon, Nov 11, 2002 at 09:28:49PM -0600, Nick Jones wrote: > > metadata is _not_ something you should be using. metadata is a > > quick-search cache database that is updated remotely. It has a basic > > link to your system, but should in no way be used to determine > > settings and data as it can be out of date. It's primary purpose is > > for searching. /var/cache/edb/dep is a valid, local system cache. >=20 > Thanks! I hadn't noticed the existence of /var/cache/edb/dep. Using it > instead of /usr/portage/metadata/cache works flawlessly. >=20 > All interested, please check the attached new version. It includes all > suggestions which were made so far. It requires >=3Dsed-4.0, otherwise > replace "xargs sed -s" by "xargs -l sed". If there aren't further > corrections/suggestions then I'll create a bug in bugzilla for it. >=20 > > Try this: > >=20 > > FEATURES=3D"mirror" emerge -efp world | ... >=20 > Unfortunately when doing this, emerge starts complaining that it can't > satisfy dependencies. >=20 > Regards, >=20 > Jos=E9 Fonseca > ---- >=20 > #!/bin/sh > # > # distfiles-clean > # > # Cleans unused files from Portage's distfiles directory. > # > # Jos=E9 Fonseca >=20 > PROGRAM=3D`basename "$0"` >=20 > while [ ${#} -gt 0 ] > do > case "$1" in > -h|--help) > USAGE=3Dy > break > ;; > -p|--pretend) > PRETEND=3Dy > ;; > *) > echo "$PROGRAM: Invalid option \'$1\'" 1>&2 > USAGE=3Dy > break > ;; > esac > shift > done >=20 > # For PORTDIR and DISTDIR > . /etc/make.globals > . /etc/make.conf >=20 > if [ "$USAGE" ] > then > echo "Usage: $PROGRAM [-h|--help] [-p|--pretend]" > echo "Cleans unused files from $DISTDIR directory." > exit > fi >=20 > DBDIR=3D/var/db/pkg > CACHEDIR=3D/var/cache/edb/dep >=20 > for DIR in "$PORTDIR" "$DISTDIR" "$DBDIR" "$CACHEDIR" > do > if [ ! -d "$DIR" ] > then > echo "$PROGRAM: \'$DIR\' not found." > exit > fi > done >=20 > TMPFILE=3D`mktemp /tmp/$0.XXXXXX` >=20 > find $DBDIR -name '*.ebuild' | sed -n -e "s:^$DBDIR/\([^/]*\)/\([^/]*\)/\= ([^/]*\)\.ebuild$:$CACHEDIR/\1/\3:p" | xargs sed -s -e '4!d;s/[[:space:]]\+= /\n/g' | sed -n -e 's:^.*/::p' | sort -u > $TMPFILE && ls -1 $DISTDIR | gre= p -v '^cvs-src$' | comm -23 - $TMPFILE | { > if [ "$PRETEND" ] > then > cat > else > sed -e "s:^:$DISTDIR/:" | xargs rm -f > fi > } >=20 > rm $TMPFILE >=20 > ---- >=20 > -- > gentoo-dev@gentoo.org mailing list -- gentoo-dev@gentoo.org mailing list