Gentoo Archives: gentoo-user

From: "Bo Ørsted Andresen" <bo.andresen@××××.dk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re-emerge missing files
Date: Mon, 26 Jun 2006 07:51:15
Message-Id: 200606260943.05479.bo.andresen@zlin.dk
In Reply to: Re: [gentoo-user] Re-emerge missing files by Dave Oxley
1 If you don't want to check md5sums with equery check then this would
2 work... ;)
3
4 # cd /var/db/pkg && for pkg in */*; do
5 grep ^dir "$pkg"/CONTENTS | cut -d" " -f2 | \
6 while read dir; do
7 if [[ ! -d "$dir" ]]; then
8 echo Dir "$dir" is missing in "$pkg";
9 fi;
10 done;
11 grep ^obj "$pkg"/CONTENTS | cut -d" " -f2 | \
12 while read file; do
13 if [[ ! -f "$file" ]]; then
14 echo File "$file" is missing in "$pkg";
15 fi;
16 done;
17 grep ^sym "$pkg"/CONTENTS | cut -d" " -f2 | \
18 while read sym; do
19 if [[ ! -L "$sym" ]]; then
20 echo Symlink "$sym" is missing in "$pkg";
21 fi;
22 done;
23 done
24
25 --
26 Bo Andresen