Files
poky/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
Robert Yang 35c8b87b1c build-compare: 2015.02.10 -> 2019.08.14
* Removed the following patches which are already merged by upstream:
  0001-Add-support-for-deb-and-ipk-packaging.patch
  Rename-rpm-check.sh-to-pkg-diff.sh.patch
  functions.sh-improve-deb-and-ipk-checking.patch
  functions.sh-remove-space-at-head.patch
  functions.sh-run-rpm-once-to-make-it-faster.patch
  pkg-diff.sh-check-for-fifo-named-pipe.patch
  pkg-diff.sh-check_single_file-return-at-once-when-sa.patch
  pkg-diff.sh-remove-space-in-the-end-for-ftype.patch

* Rebased Ignore-DWARF-sections.patch

This version is very outstanding when compare binary packages, e.g.:
PRSERV_HOST = "localhost:0"
INHERIT += "packagefeed-stability"
PACKAGE_CLASSES = "package_ipk
$ bitbake opkg
$ find tmp/deploy/ipk >/tmp/ipk_1

Add a "bbnote 'hello'" to autotools.bbclass' autotools_do_configure.

* BEFORE the upgrading, the result is:
$ diff /tmp/ipk_1  /tmp/ipk_2 -Nur | diffstat
 ipk_2 | 1570 +++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 785 insertions(+), 785 deletions(-)

* AFTER the upgrading, the result is:
$ bitbake opkg
$ find tmp/deploy/ipk >/tmp/ipk_2
$ diff /tmp/ipk_1 /tmp/ipk_2 -Nur
No output

And if we really modifed a recipe such as opkg, then it would show that it is
changed.

For a full world build AFTER the upgrading:
$ diff /tmp/ipk_6 /tmp/ipk_7 -Nur | diffstat
 ipk_7 | 2090 +++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 1045 insertions(+), 1045 deletions(-)

There are 10968 packages in totall, 1045 ones have been changed, so we can still
improve it in the future.

(From OE-Core rev: 4c77fdfc0b3b31105a4dfd1a4634f8464b52d933)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06 14:58:09 +01:00

38 lines
2.0 KiB
Diff

From 015715694eadd714b903f30ade876e0738d44974 Mon Sep 17 00:00:00 2001
From: Randy Witt <randy.e.witt@linux.intel.com>
Date: Mon, 5 Jan 2015 15:09:20 -0800
Subject: [PATCH] Ignore DWARF sections.
Assume for now that we don't care about the DWARF sections due to path
differences. However, in the case the tool is ran on a "debug" package
it will most likely falsely say the packages have no differences.
Upstream-Status: Inappropriate [other]
The package difference tool is correctly labelling the packages as different
when the DWARF sections don't match due to paths. The paths in the debug info
should actually be made to be the same using compile flags or some other
mechanism.
However, to make the tool more useful to Yocto until the work can be done
to ensure identical paths in debug sections, this patch is being applied.
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
pkg-diff.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg-diff.sh b/pkg-diff.sh
index 9c2125e..b0d77c8 100755
--- a/pkg-diff.sh
+++ b/pkg-diff.sh
@@ -851,7 +851,7 @@ check_single_file()
echo "" >$file1
echo "" >$file2
# Don't compare .build-id, .gnu_debuglink and .gnu_debugdata sections
- sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" | tr "\n" " ")"
+ sections="$($OBJDUMP -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.gnu_debugdata" -e "\.debug_abbrev" -e "\.debug_aranges" -e "\.debug_frame" -e "\.debug_info" -e "\.debug_line" -e "\.debug_loc" -e "\.debug_macinfo" -e "\.debug_pubnames" -e "\.debug_pubtypes" -e "\.debug_ranges" -e "\.debug_str" | tr "\n" " ")"
for section in $sections; do
$OBJDUMP -s -j $section old/$file | sed "s,^old/,," > $file1
$OBJDUMP -s -j $section new/$file | sed "s,^new/,," > $file2