[dpkg] 141/187: test: Simply ignore yes(1) error messages

Reiner Herrmann reiner at reiner-h.de
Sun Nov 6 12:46:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository dpkg.

commit dd13047c47def1f54696527eee9769c57b98ac90
Author: Guillem Jover <guillem at debian.org>
Date:   Mon Oct 31 01:03:01 2016 +0100

    test: Simply ignore yes(1) error messages
    
    While this is suboptimal, this is pretty much the only sane option we've
    got, as we cannot (per POSIX) reset a signal disposition that was set to
    IGNORE when the non-interactive shell got executed.
    
    This partially reverts commit f074889198fa4099474b068a611ebd56bbfc20d8
    which was just wrong.
---
 t-func/atlocal.in   | 3 ---
 t-func/deb-split.at | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/t-func/atlocal.in b/t-func/atlocal.in
index e372093..9b8a441 100644
--- a/t-func/atlocal.in
+++ b/t-func/atlocal.in
@@ -19,9 +19,6 @@ unset BZIP
 unset XZ_OPT
 unset XZ_DEFAULTS
 
-# Restore SIGPIPE to a sane default state.
-trap - PIPE
-
 if [ "$(id -u)" = 0 ]; then
   ASROOT=
 elif which fakeroot >/dev/null; then
diff --git a/t-func/deb-split.at b/t-func/deb-split.at
index 181db62..8ca6e27 100644
--- a/t-func/deb-split.at
+++ b/t-func/deb-split.at
@@ -14,7 +14,9 @@ DPKG_MOD_CONTROL([pkg-split],
 AT_CHECK([
 # Initialize the template package
 chmod -R u+w pkg-split
-yes | dd of=pkg-split/data-file bs=1024 count=1024 status=none
+# XXX: Some environments set SIGPIPE to ignore which we cannot reset, and yes
+# does check print error conditions, so we ignore its error message here.
+yes 2>/dev/null | dd of=pkg-split/data-file bs=1024 count=1024 status=none
 find pkg-split | xargs touch -t 197001010100.00
 $ASROOT dpkg-deb -b -Znone pkg-split >/dev/null
 ])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list