-
Notifications
You must be signed in to change notification settings - Fork 3
/
noarchcheck
executable file
·40 lines (35 loc) · 1012 Bytes
/
noarchcheck
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# Verifies that noarch packages in different architectures do not differ
#
# Run this in any package checkout dir
# Returns 0 (success) if no significant diff was reported by build-compare
# Writes status and diff to .rb.noarchcheck*
detect_repo()
{
osc buildinfo |
perl -ne '/^<buildinfo.*repository="([^"]*)"/ && print $1'
}
: ${repo:=`detect_repo`}
if rpm_is_noarch ; then
foundnum=0
found=
for arch in x86_64 i586 s390x aarch64 ; do
# clean
rm -rf binaries.$arch
g="osc getbinaries --sources"
$g -d binaries.$arch $repo $arch
if [ -e binaries.$arch/*.src.rpm ] ; then
found="$found binaries.$arch"
let foundnum++
[ $foundnum = 2 ] && break
fi
done
echo "$foundnum $found"
[ $foundnum != 2 ] || bash ~/reproducibleopensuse/build-compare/same-build-result.sh -a $found > .rb.noarchcheck.diff
ret=$?
else
ret=0
fi
echo $ret > .rb.noarchcheck
echo "ret=$ret"
exit $ret