diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-07-17 20:32:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-25 23:46:59 +0100 |
commit | e3245747342860da44fcbb49ac68b8b33e5b43a3 (patch) | |
tree | cedd27788f394bd77fd2ccd4008a65f720af9579 /meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch | |
parent | 71eee4adbcda1d9e75cbce58045d03ea12432431 (diff) | |
download | openembedded-core-contrib-e3245747342860da44fcbb49ac68b8b33e5b43a3.tar.gz |
build-compare: fix checking for named pipe and others
* Fixed checking for named pipe
* Return at once when archives are the same
* Fix for type "directory"
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch')
-rw-r--r-- | meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch new file mode 100644 index 0000000000..b42af2531d --- /dev/null +++ b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch @@ -0,0 +1,37 @@ +From 657983ef9ca8f8354172682e17408c4f6b5bc667 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Thu, 14 Jul 2016 19:46:08 -0700 +Subject: [PATCH 1/4] pkg-diff.sh: check_single_file(): return at once when + same + +If the two files are the same, return at once, this can save a lot of +time when there are archives inside archives. + +Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + pkg-diff.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/pkg-diff.sh b/pkg-diff.sh +index 3cf10aa..402d4a4 100644 +--- a/pkg-diff.sh ++++ b/pkg-diff.sh +@@ -293,6 +293,13 @@ check_compressed_file() + check_single_file() + { + local file="$1" ++ ++ # If the two files are the same, return at once. ++ if [ -f old/$file -a -f new/$file ]; then ++ if cmp -s old/$file new/$file; then ++ return 0 ++ fi ++ fi + case $file in + *.spec) + sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file +-- +2.9.0 + |