summaryrefslogtreecommitdiffstats
path: root/rebuild-scripts/buildcheck
diff options
context:
space:
mode:
authorYaakov Nemoy <loupgaroublond@gmail.com>2008-09-28 10:29:00 -0400
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2008-09-28 10:29:00 -0400
commitd491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65 (patch)
tree9940bed9d7c8edd1d416659f23b5c56c929ef8c9 /rebuild-scripts/buildcheck
parent40119a669a625b839503d91aa5d40e112f7e46e2 (diff)
downloadfedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.tar.gz
fedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.tar.xz
fedora-devshell-d491ac3a2199cb1f3cdcd4f2f6b3d877b3a65a65.zip
Make the shell functions a bit more modular for scripting
Diffstat (limited to 'rebuild-scripts/buildcheck')
-rwxr-xr-xrebuild-scripts/buildcheck58
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