diffrpms tool to compare RPMs between revisions
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.
This commit is contained in:
parent
4964e8a955
commit
45d61c6f12
33
diffrpms
Executable file
33
diffrpms
Executable file
@ -0,0 +1,33 @@
|
||||
#!/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'
|
Loading…
Reference in New Issue
Block a user