Blame scripts/multiarch_check_tree.sh

Karanbir Singh b653bc
#!/bin/sh
Karanbir Singh b653bc
#
Karanbir Singh b653bc
# Aim of this script is to look at all the rpms in the present directory
Karanbir Singh b653bc
# and find multiarch pkgs, then to evaluate the md5's of each shared
Karanbir Singh b653bc
# file between the multiarch rpms. The output will list all files
Karanbir Singh b653bc
# where the md5 does not match.
Karanbir Singh b653bc
#
Karanbir Singh b653bc
# Some common sense required to parse the output.
Karanbir Singh b653bc
# 
Karanbir Singh b653bc
# Sep 13 2006 Karanbir Singh <kbsingh@karan.org>
Karanbir Singh b653bc
# - initial hackup
Karanbir Singh b653bc
Karanbir Singh b653bc
for f in `rpm --qf "%{name}-%{version}-%{release}\n" -qp *.rpm | sort  | uniq -d `
Karanbir Singh b653bc
do 
Karanbir Singh b653bc
  echo -e "\n\n ------ \n Testing " $f
Karanbir Singh b653bc
  rpm --qf "[%{=arch} %{filenames} :%{filemd5s}: \n]" -qp $f.x86_64.rpm > 64.lst
Karanbir Singh b653bc
  rpm --qf "[%{=arch} %{filenames} :%{filemd5s}: \n]" -qp $f.i[356]86.rpm > 32.lst  
Karanbir Singh b653bc
  
Karanbir Singh b653bc
  cat *.lst | grep -v "::" | sort -k2 | uniq -u -f1
Karanbir Singh b653bc
done
Karanbir Singh b653bc
Karanbir Singh b653bc
rm *.lst