diff --git a/build-compare.changes b/build-compare.changes index d07cc48..2430c23 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 25 14:27:34 UTC 2016 - olaf@aepfle.de + +- Update strip_numbered_anchors to catch more random identifiers + ------------------------------------------------------------------- Wed Aug 24 13:22:12 UTC 2016 - liezhi.yang@windriver.com diff --git a/build-compare.spec b/build-compare.spec index 3a88905..39874fc 100644 --- a/build-compare.spec +++ b/build-compare.spec @@ -21,7 +21,7 @@ Summary: Build Result Compare Script License: GPL-2.0+ Group: Development/Tools/Building Url: https://github.com/openSUSE/build-compare -Version: 20160824T152429.e634aef +Version: 20160825T162810.b6dc062 Release: 0 Source1: COPYING Source2: same-build-result.sh diff --git a/functions.sh b/functions.sh index fff1f62..09ef9ec 100644 --- a/functions.sh +++ b/functions.sh @@ -217,8 +217,8 @@ function cmp_spec () # are the same. cat $spec_old | trim_release_old > $file1 cat $spec_new | trim_release_new > $file2 - echo "comparing the whole specfile" - if diff -au $spec_old $spec_new; then + echo "comparing the rpm tags of $name_new" + if diff -au $file1 $file2; then if test -z "$check_all"; then rm $file1 $file2 $spec_old $spec_new return 0 diff --git a/pkg-diff.sh b/pkg-diff.sh index 59f874e..80904e6 100644 --- a/pkg-diff.sh +++ b/pkg-diff.sh @@ -244,13 +244,30 @@ trim_man_TH() strip_numbered_anchors() { # Remove numbered anchors on Docbook / HTML files. - # This should be save since we remove them from old and new files. - # A trailing or tag will stay also on both files. + # + # + # + # 1 TeX + #
+ for f in old/$file new/$file; do - sed -i -e 's%<[ ]*a[ ]\+name[^<]*[0-9]\+[^<]*%%g' \ - -e 's%<[ ]*a[ ]\+href[^<]*#[^<]*[0-9]\+[^<]*%%g' \ - -e 's%<[^<]*id="ftn\.[^<]*[0-9]\+[^<]*%%g' $f + sed -ie ' + 1 { + : N + $ { + s@\(]* name=\n\?"\)\(id[a-z][0-9]\+\)\("[^>]*>\)@\1id_idN\3name_idN\5@g + s@\(]*>\)@\1idN\3@g + s@\(]*>\)@\1nameN\3@g + s@\(]\+id="\)\(id[a-z0-9]\+\)\("[^>]*>\)@\1href_anchor\3id_idN\5@g + s@\(]*>\)@\1href_anchor\3@g + s@\(]*>\)@\1ftn.N\3@g + } + N + b N + }' $f & done + wait }