Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
finding files not in packages
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
fsimon
n00b
n00b


Joined: 25 Jul 2003
Posts: 3

PostPosted: Tue Sep 16, 2003 5:04 pm    Post subject: finding files not in packages Reply with quote

I made this script to find out which files are not in the packages file database:

Code:
#!/bin/sh

echo -n "Creating list... " >&2
FILE_LIST=`tempfile --prefix=pkgls --mode=0600`
qpkg -l -nc | sed "/^[^/]/d" > $FILE_LIST
echo "[done]" >&2

echo -n "Scanning file list... " >&2
find /bin /etc /lib /opt /sbin /usr \
  -not -regex "^/lib/dev-state.*" \
  -not -regex "^/lib/modules.*" \
  -not -regex "^/usr/portage.*" \
  -not -regex "^/usr/src.*" \
  -not -regex "^/usr/tmp.*" \
  -exec sh -c "grep {} $FILE_LIST &> /dev/null || echo {}" \;
echo "[done]" >&2

rm -f $FILE_LIST

(it require qpkg from gentoolkit)

I'm sure this is not the best, but now works for me (I hope in upgrades and fixes by who's interested in this thing).
I find many /etc files not in the database... ok... that's fine I know what they are and I can understand why they are not in the database, but I'm wondering why many python and perl library come out too.

As you can see in the script I dont check the /var path... I'm sure the most of those file are not in the package file database, what about using integrit to monitor them? any idea about this all?

An other useful thing I use is:
Code:
qpkg -c -v

It checks the integrity of files installed.

Any suggestion to make it better is welcome.
Thanks in advance.

--
Simon.
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