From b653bc34a5480bdf71f4903f8f6aed7edb93498b Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Jun 17 2014 13:41:40 +0000 Subject: add a script to check multiarch packages and ensure they are installable in a tree --- diff --git a/scripts/multiarch_check_tree.sh b/scripts/multiarch_check_tree.sh new file mode 100755 index 0000000..199d42f --- /dev/null +++ b/scripts/multiarch_check_tree.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Aim of this script is to look at all the rpms in the present directory +# and find multiarch pkgs, then to evaluate the md5's of each shared +# file between the multiarch rpms. The output will list all files +# where the md5 does not match. +# +# Some common sense required to parse the output. +# +# Sep 13 2006 Karanbir Singh +# - initial hackup + +for f in `rpm --qf "%{name}-%{version}-%{release}\n" -qp *.rpm | sort | uniq -d ` +do + echo -e "\n\n ------ \n Testing " $f + rpm --qf "[%{=arch} %{filenames} :%{filemd5s}: \n]" -qp $f.x86_64.rpm > 64.lst + rpm --qf "[%{=arch} %{filenames} :%{filemd5s}: \n]" -qp $f.i[356]86.rpm > 32.lst + + cat *.lst | grep -v "::" | sort -k2 | uniq -u -f1 +done + +rm *.lst