]> diplodocus.org Git - nmh/blobdiff - tools/showbuildenv
Added several historical source archives from the early days of MH.
[nmh] / tools / showbuildenv
index 5eec6ee8c93089cae3b5f2f48c190ca64c848941..37accd2df4653b04ca938c5aba256fdab69323af 100755 (executable)
@@ -5,13 +5,14 @@
 # build environment on machines they can't login on.  It also provides
 # a history in the build logs that might be useful in catching
 # regressions.
-# 
+#
 # This script should *only* report basic information about the build
 # environment, and only that necessary to reproduce the build
 # environment.
 #
-# FIXME: Document meaning of script's exit status, if any.
-# It jumps through hoops with `|| true' despite not using `set -e'.
+# The script's exit status must be zero if all went acceptably well as
+# buildbot checks for this and marks the `environment' stage as failed
+# otherwise.
 
 offset () {
     sed -e '/./s/^/    /' "$@"
@@ -28,7 +29,7 @@ header () {
 # also use that to placate broken logic that use its prescence as a
 # use-RPM test.
 for f in \
-    /etc/os-release /etc/arch-release /etc/debian_version \
+    /etc/os-release /etc/arch-release /etc/centos-release /etc/debian_version \
     /etc/fedora-release /etc/gentoo-release /etc/redhat-release \
     /etc/lsb-release \
     ; do
@@ -63,6 +64,7 @@ case ${os} in
        cc -v 2>&1 | offset
 
        header Installed packages:
+        #### pkg(7) or pkg_info(1) might not always be available.
        (pkg info 2>/dev/null | offset) || true
        (pkg_info 2>/dev/null | offset) || true
        ;;