blob: e4f0c54163217deffb51bbba304efabd0b566a1b [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001From a78fe4f792a9ac9f4d364e836c8855f48561d6f2 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 14 Jul 2016 19:52:18 -0700
4Subject: [PATCH 3/4] pkg-diff.sh: check for fifo(named pipe)
5
6Otherwise "cmp -s fifo1 fifo2" will wait for inputing forever.
7
8Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 pkg-diff.sh | 7 +++++++
13 1 file changed, 7 insertions(+)
14
15diff --git a/pkg-diff.sh b/pkg-diff.sh
16index 5dd3a38..1f353aa 100644
17--- a/pkg-diff.sh
18+++ b/pkg-diff.sh
19@@ -735,6 +735,13 @@ check_single_file()
20 return 1
21 fi
22 ;;
23+ fifo*pipe*)
24+ ftype_new="`/usr/bin/file new/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`"
25+ if [ "$ftype_new" = "$ftype" ]; then
26+ return 0
27+ fi
28+ return 1
29+ ;;
30 *)
31 if ! diff_two_files; then
32 return 1
33--
342.9.0
35