45d61c6f12
E.g. `./diffrpms 134 138' compares binary packagas from revision 134 and revision 138. You must build them before into x86_64 and noarch subdirectories.
34 lines
912 B
Bash
Executable File
34 lines
912 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "$#" != 2 ]; then
|
|
cat<<EOM
|
|
Usage: $(basename $0) OLD_RELEASE NEW_RELEASE
|
|
|
|
Compares corresponding RPM packages produced in OLD_RELASE and NEW_RELEASE.
|
|
The same version strings are assumed.
|
|
EOM
|
|
exit 1;
|
|
fi
|
|
|
|
OLD_RELEASE="$1"
|
|
NEW_RELEASE="$2"
|
|
|
|
function process_dir() {
|
|
for F in $(ls $1/* | sed -r 's/-[0-9].*//' | sort | uniq ); do
|
|
OLD_RPM=$(echo ${F}-[0-9]*-${OLD_RELEASE}.*)
|
|
NEW_RPM=$(echo ${F}-[0-9]*-${NEW_RELEASE}.*)
|
|
|
|
test \( ! -e "$OLD_RPM" \) -a \( ! -e "$NEW_RPM" \) && continue
|
|
if [ ! -e "$OLD_RPM" ]; then echo "+ Package ${F}"; fi
|
|
if [ ! -e "$NEW_RPM" ]; then echo "- Package ${F}"; fi
|
|
|
|
DIFF=$(rpmdiff -i S -i 5 -i T "$OLD_RPM" "$NEW_RPM" | \
|
|
grep -vE 'REQUIRES perl = | REQUIRES rpmlib\(' )
|
|
|
|
test -n "$DIFF" && printf '* %s:\n%s\n' "$F" "$DIFF"
|
|
done
|
|
}
|
|
|
|
process_dir 'x86_64'
|
|
process_dir 'noarch'
|