Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SCRIPT: Locate files outside of portage control
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5595
Location: Removed by Neddy

PostPosted: Sat Jan 22, 2005 4:41 pm    Post subject: SCRIPT: Locate files outside of portage control Reply with quote

I have written a crude script that shows what files portage has installed onto your system and what is different from it.

There are some path exclusions since things like /home and /var will have alot.

Code:

#!/bin/bash
#redundant
# script that shows files that do not belong to any other

echo "/boot/
/dev/
/etc/env.d/
/etc/gconf/
/etc/portage/
/home/
/lib/modules/
/mnt/
/root/
/sys/
/tmp/
/usr/lib/perl5/
/usr/lib/python2.3/
/usr/local/portage/
/usr/portage/
/usr/share/icons/
/usr/src/
/var/
lost+found" > /tmp/skip.txt

echo "Created exclusion list"
echo "Creating list of all portage-controlled files. Please wait"
echo " "

{
find /var/db/pkg -type f -name "CONTENTS" | \
while read f ; do
   awk '/^obj/ {print $2}' < ${f}
done | sort -u | grep -v -f /tmp/skip.txt | sort -u > /tmp/files.txt
}

echo "Created list of portage controlled files"
echo "Creating list of actual files. Please wait"

find / -mount -type f | grep -v -f /tmp/skip.txt | sort -u > /tmp/files2.txt
diff /tmp/files.txt /tmp/files2.txt | awk '/>/ {print $2}' > /tmp/diff.txt
less /tmp/diff.txt


I am not saying that all files shown up with this list should be removed, definitly not. but it is a list to examine.

Mine threw up some /etc stuff to do with firestarter. I had it installed a while back

Also things like /opt/simili23/* a VHDL IDE

a few other files here and there. However, it did throw up a load of files like

...
/usr/lib/scons/SCons/Tool/dvips.py
...

infact all to do with scon. Did a equery belongs on one of them and it was todo with the SCONS package.

I check and I didnt have this emerged. I emerged it and then removed it BUT it did not remove any of the files!!!

so two things -

1) the script
2) what is going on with the scon package
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum