From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13208 invoked by uid 1002); 3 Mar 2003 23:06:47 -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 11260 invoked from network); 3 Mar 2003 23:06:47 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Evan Powers To: gentoo-dev Date: Mon, 3 Mar 2003 18:06:45 -0500 User-Agent: KMail/1.4.3 References: <3E6234DF.104@andrewarbon.co.uk> In-Reply-To: <3E6234DF.104@andrewarbon.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303031806.45507.powers.161@osu.edu> Subject: Re: [gentoo-dev] Cruft detecting script X-Archives-Salt: e62b9c64-092c-456e-813a-d5f7ed38b60b X-Archives-Hash: fbb4cba1201c034c9c0f8e5cadc2f421 On Sunday 02 March 2003 11:44 am, Andy Arbon wrote: > Has anyone written something like this, and does anyone have any reason > why something like this wouldn't work or be useful? I was bored so I quickly hacked this together, just to see how it would d= o. time sh script-cruft.sh =2E..lots of output.... real 0m48.147s user 0m33.010s sys 0m3.810s My first attempt was more like "real 125m48.147s", but I just wasn't very= =20 intelligent about that. This version actually exploits sed's capabilities= =2E A=20 15577% increase in performance for a few minutes of work isn't too shabby= , if=20 I may say so myself. ;-) The script produced far more output than I would have naively expected, a= bout=20 4300 lines. There might be too much noise for the tool to be useful. On t= he=20 other hand.... It did catch some things that surprised me. On my system there are lots o= f=20 libraries and perl related files that aren't known to portage (though the= y=20 correspond to software I've installed via an ebuild). For example, on my=20 system there are several programs in /usr/bin which portage doesn't know=20 about. /usr/bin/amstex -> tex /usr/bin/cont-cz -> pdfetex /usr/bin/cont-de -> pdfetex /usr/bin/cont-en -> pdfetex /usr/bin/cont-nl -> pdfetex /usr/bin/cont-uk -> pdfetex /usr/bin/cpp /usr/bin/cpp.orig /usr/bin/elatex -> etex /usr/bin/eplain -> tex /usr/bin/frlatex -> tex /usr/bin/lambda -> omega /usr/bin/latex -> tex /usr/bin/pdfelatex -> pdfetex /usr/bin/pdflatex -> pdftex /usr/bin/rec -> /usr/bin/play Makes me think the app-text/tetex-1.0.7-r11 ebuild was broken; don't know= if=20 the current stable 1.0.7-r12 does the same thing, I'll have to look into=20 that. The /usr/bin/cpp looks like a script related to sys-devel/gcc-confi= g,=20 you'd think portage would know about this too. ---script-cruft.sh--- #!/bin/sh find / '(' -path /proc \ =09-or -path /dev \ =09-or -path /boot \ =09-or -path /mnt \ =09-or -path /tmp \ =09-or -path /var/tmp \ =09-or -path /root \ =09-or -path /home \ =09-or -path /lib/dev-state \ =09-or -path /lib/modules \ =09-or -path /usr/portage \ =09-or -path /var/cache/edb \ =09-or -path /var/db/pkg \ =09')' -prune -or -print \ | sort >/tmp/allfiles qpkg -nc -l \ | sed -n -e 's/ -> .*//' -e '1,2 d' -e '/^$/,+2! p' \ | sort \ | uniq >/tmp/portagefiles comm -2 -3 /tmp/allfiles /tmp/portagefiles ---script-cruft.sh--- -- gentoo-dev@gentoo.org mailing list