--- pacman.install 2007-05-11 02:00:48.000000000 +0200
+++ pacman.install.new 2007-05-11 02:22:54.000000000 +0200
@@ -51,14 +51,9 @@
for file in $config; do
echo ":: -> finding owner of /$file..."
- line=$(LC_ALL=C LANG=C pacman -Qo /$file 2>/dev/null)
+ path=$(find $dbpath -name files | LC_ALL=C xargs egrep -l "$file[[:space:]]+[0-9a-fA-F]+")
# if file is owned by a package, go find its incorrectly stored sum
- if [ ! -z "$line" ]; then
- # get the name and version of the package owning file
- name=$(echo $line | awk '{print $5}')
- version=$(echo $line | awk '{print $6}')
- # set the path to the backup array holding the md5sum
- path="$dbpath/$name-$version/files"
+ if [ ! -z "$path" ]; then
# run a sed on the path to reset the line containing $file
# NOTE: literal tab characters in sed expression after $file
echo ":: -> resetting sum of /$file..."