public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: William Kenworthy <billk@iinet.net.au>
To: "José Fonseca" <j_r_fonseca@yahoo.co.uk>
Cc: Nick Jones <carpaski@twobit.net>,
	gentoo-dev List <gentoo-dev@gentoo.org>
Subject: Re: [gentoo-dev] Script to clean old files from /usr/portage/distfiles
Date: 12 Nov 2002 19:28:35 +0800	[thread overview]
Message-ID: <1037100515.10897.4.camel@rattus.localdomain> (raw)
In-Reply-To: <20021112102144.GA20309@localhost.localdomain>

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?  

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é 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.
> 
> Thanks! I hadn't noticed the existence of /var/cache/edb/dep. Using it
> instead of /usr/portage/metadata/cache works flawlessly.
> 
> All interested, please check the attached new version. It includes all
> suggestions which were made so far. It requires >=sed-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.
> 
> > Try this:
> > 
> > FEATURES="mirror" emerge -efp world |  ...
> 
> Unfortunately when doing this, emerge starts complaining that it can't
> satisfy dependencies.
> 
> Regards,
> 
> José Fonseca
> ----
> 

> #!/bin/sh
> #
> # distfiles-clean
> #
> # Cleans unused files from Portage's distfiles directory.
> #
> # José Fonseca <j_r_fonseca@yahoo.co.uk>
> 
> PROGRAM=`basename "$0"`
> 
> while [ ${#} -gt 0 ]
> do
> 	case "$1" in
> 		-h|--help)
> 			USAGE=y
> 			break
> 			;;
> 		-p|--pretend)
> 			PRETEND=y
> 			;;
> 		*)
> 			echo "$PROGRAM: Invalid option \'$1\'" 1>&2
> 			USAGE=y
> 			break
> 			;;
> 	esac
> 	shift
> done
> 
> # For PORTDIR and DISTDIR
> . /etc/make.globals
> . /etc/make.conf
> 
> if [ "$USAGE" ]
> then
> 	echo "Usage:	$PROGRAM [-h|--help] [-p|--pretend]"
> 	echo "Cleans unused files from $DISTDIR directory."
> 	exit
> fi
> 
> DBDIR=/var/db/pkg
> CACHEDIR=/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=`mktemp /tmp/$0.XXXXXX`
> 
> 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 | grep -v '^cvs-src$' | comm -23 - $TMPFILE | {
> 	if [ "$PRETEND" ]
> 	then
> 		cat
> 	else
> 		sed -e "s:^:$DISTDIR/:" | xargs rm -f
> 	fi
> }
> 
> rm $TMPFILE
> 
> ----
> 

> --
> gentoo-dev@gentoo.org mailing list



--
gentoo-dev@gentoo.org mailing list


  reply	other threads:[~2002-11-12 11:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11 20:38 [gentoo-dev] Script to clean old files from /usr/portage/distfiles José Fonseca
2002-11-11 23:42 ` Johannes Ballé
2002-11-12  1:13   ` José Fonseca
2002-11-12  2:01     ` Marko Mikulicic
     [not found]       ` <20021111212849.A23035@twobit.net>
2002-11-12 10:21         ` José Fonseca
2002-11-12 11:28           ` William Kenworthy [this message]
2002-11-12 12:28             ` José Fonseca
2002-11-12 15:37           ` Nils Ohlmeier
2002-11-12 17:56             ` José Fonseca
2002-11-12 23:12               ` Nils Ohlmeier
2002-11-12  0:29 ` Marko Mikulicic
2002-11-12  0:54   ` José Fonseca
2002-11-12  1:50     ` Marko Mikulicic
  -- strict thread matches above, loose matches on Subject: below --
2003-03-25 18:55 DJ Cozatt
2003-03-25 20:34 ` Chris Bainbridge
2003-03-27  4:53   ` DJ Cozatt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1037100515.10897.4.camel@rattus.localdomain \
    --to=billk@iinet.net.au \
    --cc=carpaski@twobit.net \
    --cc=gentoo-dev@gentoo.org \
    --cc=j_r_fonseca@yahoo.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox