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-26 08:56:28 +0100 |
commit | ad6aae31065b798b6f6f83eb830cebb075a0b62a (patch) | |
tree | 50ddbde77130a68c43619c27966e8528bca465b8 /meta | |
parent | fef5ae147e883743ee0e3ba2d3e4b547137c8984 (diff) | |
download | poky-ad6aae31065b798b6f6f83eb830cebb075a0b62a.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"
(From OE-Core rev: e3245747342860da44fcbb49ac68b8b33e5b43a3)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
4 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb index 9ec8c2392f..09740d4921 100644 --- a/meta/recipes-devtools/build-compare/build-compare_git.bb +++ b/meta/recipes-devtools/build-compare/build-compare_git.bb | |||
@@ -11,6 +11,9 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \ | |||
11 | file://0001-Add-support-for-deb-and-ipk-packaging.patch \ | 11 | file://0001-Add-support-for-deb-and-ipk-packaging.patch \ |
12 | file://functions.sh-remove-space-at-head.patch \ | 12 | file://functions.sh-remove-space-at-head.patch \ |
13 | file://functions.sh-run-rpm-once-to-make-it-faster.patch \ | 13 | file://functions.sh-run-rpm-once-to-make-it-faster.patch \ |
14 | file://pkg-diff.sh-check-for-fifo-named-pipe.patch \ | ||
15 | file://pkg-diff.sh-check_single_file-return-at-once-when-sa.patch \ | ||
16 | file://pkg-diff.sh-remove-space-in-the-end-for-ftype.patch \ | ||
14 | " | 17 | " |
15 | 18 | ||
16 | SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" | 19 | SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" |
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch new file mode 100644 index 0000000000..e4f0c54163 --- /dev/null +++ b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From a78fe4f792a9ac9f4d364e836c8855f48561d6f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 14 Jul 2016 19:52:18 -0700 | ||
4 | Subject: [PATCH 3/4] pkg-diff.sh: check for fifo(named pipe) | ||
5 | |||
6 | Otherwise "cmp -s fifo1 fifo2" will wait for inputing forever. | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10] | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | --- | ||
12 | pkg-diff.sh | 7 +++++++ | ||
13 | 1 file changed, 7 insertions(+) | ||
14 | |||
15 | diff --git a/pkg-diff.sh b/pkg-diff.sh | ||
16 | index 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 | -- | ||
34 | 2.9.0 | ||
35 | |||
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 @@ | |||
1 | From 657983ef9ca8f8354172682e17408c4f6b5bc667 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 14 Jul 2016 19:46:08 -0700 | ||
4 | Subject: [PATCH 1/4] pkg-diff.sh: check_single_file(): return at once when | ||
5 | same | ||
6 | |||
7 | If the two files are the same, return at once, this can save a lot of | ||
8 | time when there are archives inside archives. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10] | ||
11 | |||
12 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
13 | --- | ||
14 | pkg-diff.sh | 7 +++++++ | ||
15 | 1 file changed, 7 insertions(+) | ||
16 | |||
17 | diff --git a/pkg-diff.sh b/pkg-diff.sh | ||
18 | index 3cf10aa..402d4a4 100644 | ||
19 | --- a/pkg-diff.sh | ||
20 | +++ b/pkg-diff.sh | ||
21 | @@ -293,6 +293,13 @@ check_compressed_file() | ||
22 | check_single_file() | ||
23 | { | ||
24 | local file="$1" | ||
25 | + | ||
26 | + # If the two files are the same, return at once. | ||
27 | + if [ -f old/$file -a -f new/$file ]; then | ||
28 | + if cmp -s old/$file new/$file; then | ||
29 | + return 0 | ||
30 | + fi | ||
31 | + fi | ||
32 | case $file in | ||
33 | *.spec) | ||
34 | sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file | ||
35 | -- | ||
36 | 2.9.0 | ||
37 | |||
diff --git a/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch new file mode 100644 index 0000000000..8077172333 --- /dev/null +++ b/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 836a6783df9c582a834fca239f227063a5687715 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 14 Jul 2016 19:49:12 -0700 | ||
4 | Subject: [PATCH 2/4] pkg-diff.sh: remove space in the end for ftype | ||
5 | |||
6 | Versions of file like 5.14 returns a " " in the end, for example: | ||
7 | ftype="directory ", but we need ftype="directory", remove the space to | ||
8 | fix the problem. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10] | ||
11 | |||
12 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
13 | --- | ||
14 | pkg-diff.sh | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/pkg-diff.sh b/pkg-diff.sh | ||
18 | index 402d4a4..5dd3a38 100644 | ||
19 | --- a/pkg-diff.sh | ||
20 | +++ b/pkg-diff.sh | ||
21 | @@ -633,7 +633,7 @@ check_single_file() | ||
22 | ;; | ||
23 | esac | ||
24 | |||
25 | - ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'` | ||
26 | + ftype=`/usr/bin/file old/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'` | ||
27 | case $ftype in | ||
28 | PE32\ executable*Mono\/\.Net\ assembly*) | ||
29 | echo "PE32 Mono/.Net assembly: $file" | ||
30 | -- | ||
31 | 2.9.0 | ||
32 | |||