diff options
Diffstat (limited to 'rebuild-scripts/buildcheck')
-rwxr-xr-x | rebuild-scripts/buildcheck | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/rebuild-scripts/buildcheck b/rebuild-scripts/buildcheck new file mode 100755 index 0000000..be2bba4 --- /dev/null +++ b/rebuild-scripts/buildcheck @@ -0,0 +1,58 @@ +#!/bin/bash + +# if this one is rebuild again it will confuse the script: +PACKAGESUPTO=recode +byebye() +{ + [[ -e "${TMPDIR}" ]] && rm -f "${TMPDIR}/owners.list" "${TMPDIR}/repoquery" "${TMPDIR}/repoquery-noarch" "${TMPDIR}/result" + [[ -e "${TMPDIR}" ]] && rmdir "${TMPDIR}" + local return=${1} + shift + [[ "${1}" ]] && echo $@ + exit ${return} +} + + + +if ! TMPDIR="$(mktemp -d)" +then + byebye 1 Could not create TMPDIR +fi +echo "TMPDIR is $TMPDIR" + +if ! wget --quiet -O ${TMPDIR}/owners.list http://cvs.fedora.redhat.com/viewcvs/*checkout*/owners/owners.list?root=extras +then + byebye 2 Failed to get owners.list +fi + +if ! repoquery -a --repoid=buildcheck-extras-development-sources --repoid=buildcheck-extras-development-buildsys --qf='%{buildtime} %{name} %{version}-%{release}' *.src | sort | grep -B 9999 ${PACKAGESUPTO} | head -n -1 > ${TMPDIR}/repoquery +then + byebye 3 Repoquery failed +fi + +if ! repoquery -a --repoid=buildcheck-extras-development-x86 --repoid=buildcheck-extras-development-x64 --repoid=buildcheck-extras-development-ppc --repoid=buildcheck-extras-development-buildsys --qf='%{buildtime} %{name} %{arch} %{version}-%{release}' | sort | grep ' noarch ' | awk '{print $2}' > ${TMPDIR}/repoquery-noarch +then + byebye 3 Repoquery failed +fi + + + +while read buildtime name verrel +do + if ownerstring="$(grep \|${name}\| ${TMPDIR}/owners.list)" + then + echo "${ownerstring}" | while IFS='|' read ignoredone ignoredtwo ignoredthree emailone emailtwo emailthree emailfour alsoignored + do + echo ${emailone} ${name} ${verrel} | sed 's|@|_AT_|' >> ${TMPDIR}/result + done + else + echo No owner found for "${name}" >&2 + fi +done < ${TMPDIR}/repoquery + +sort < ${TMPDIR}/result | uniq | column -t > extras-tobuild +sort < ${TMPDIR}/result | uniq | column -t | grep -f ${TMPDIR}/repoquery-noarch > extras-tobuild-noarch +sort < ${TMPDIR}/result | uniq | column -t | grep -v -f ${TMPDIR}/repoquery-noarch > extras-tobuild-arch + + +byebye 0 |