[Bug 889629] New: [PATCH] build-compare: Remove numbered anchors from all Docbook / HTML files
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c0 Summary: [PATCH] build-compare: Remove numbered anchors from all Docbook / HTML files Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other URL: https://pmbs.links2linux.de/package/show/Essentials/bu ild-compare OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: 3rd party software AssignedTo: coolo@suse.com ReportedBy: johannesobermayr@gmx.de QAContact: opensuse-communityscreening@forge.provo.novell.com CC: adrian@suse.com, aj@suse.com Found By: --- Blocker: --- See now same result: https://pmbs.links2linux.de/package/live_build_log/Multimedia/kid3/openSUSE_... -</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="idm139710521211696"></a>Synchronisierter Text und Ereignis-Zeitcodes</h3></div></div></div><p> +</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="idm140449880069616"></a>Synchronisierter Text und Ereignis-Zeitcodes</h3></div></div></div><p> Productive on: https://pmbs.links2linux.de/package/show/Essentials/build-compare Index: build-compare.changes =================================================================== --- build-compare.changes (revision bbc42ce7d904cdb673fb3857da19bb8c) +++ build-compare.changes (working copy) @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 29 15:07:04 UTC 2014 - johannesobermayr@gmx.de + +- Remove numbered anchors from all Docbook / HTML files. + ------------------------------------------------------------------- Tue Jul 22 06:45:25 UTC 2014 - meissner@suse.com Index: rpm-check.sh =================================================================== --- rpm-check.sh (revision bbc42ce7d904cdb673fb3857da19bb8c) +++ rpm-check.sh (working copy) @@ -136,6 +136,18 @@ return 0 } +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 </a> or </div> tag will stay also on both files + 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 + done +} + check_single_file() { local file="$1" @@ -266,6 +278,7 @@ sed -i -e 's|Generated on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] 20[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f # Generated on Sat Aug 14 2010 16:49:48 for libssh sed -i -e 's|Generated on ... ... [0-9]* 20[0-9][0-9] [0-9]*:[0-9][0-9]:[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f + strip_numbered_anchors done ;; /usr/share/javadoc/*.html |\ @@ -281,6 +294,7 @@ sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\(.*\)GNU Classpath Tools</a>, on [A-Z][a-z]* [0-9]*, 20?? [0-9]*:??:?? \(a|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\1GNU Classpath Tools</a>, on January 1, 2009 0:00:00 a.m. GMT.</p>%' $f sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\(.*GNU Classpath Tools</a>\), on [a-zA-Z]* [0-9][0-9], 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\1,on May 1, 2010 1:11:42 p.m. GMT.</p>%' $f # deprecated-list is randomly ordered, sort it for comparison + strip_numbered_anchors case $f in */deprecated-list.html) sort -o $f $f @@ -368,13 +382,8 @@ ;; /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\ /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2) - # various kde and gtk packages - for f in old/$file new/$file; do - sed -i -e 's%name="id[0-9]*"\([> ]\)%name="id424242"\1%g' $f - sed -i -e 's%name="[a-z]*\.id[0-9]*"%name="ftn.id111111"%g' $f - sed -i -e 's%\.html#id[0-9]*"\(/\)\?>%.html#id424242"\1>%g' $f - sed -i -e 's%href="#\([a-z]*\.\)\?id[0-9]*"\([> ]\)%href="#\1id0000000"\2%g' $f - sed -i -e 's%id="\([a-z]*\.\)\?id[0-9]*"\([> ]\)%id="\1id0000000"\2%g' $f + for f in old/$file new/$file; do + strip_numbered_anchors done ;; */created.rid) @@ -388,6 +397,7 @@ # <td>Mon Sep 20 19:02:43 +0000 2010</td> for f in old/$file new/$file; do sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f + strip_numbered_anchors done ;; */Linux*Env.Set.sh) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c Stephan Kulow <coolo@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|coolo@suse.com |aj@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c1 --- Comment #1 from Andreas Jaeger <aj@suse.com> 2014-08-11 08:19:29 UTC --- The patch is wrong - the strip_numbered_anchors needs to be outside of the for loop. I'll adjust the patch... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c2 --- Comment #2 from Andreas Jaeger <aj@suse.com> 2014-08-11 08:22:36 UTC --- Patch for review: Index: build-compare.changes =================================================================== --- build-compare.changes (revision 46d888ad1a897a09583164f906248943) +++ build-compare.changes (working copy) @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 29 15:07:04 UTC 2014 - johannesobermayr@gmx.de + +- Remove numbered anchors from all Docbook / HTML files. + ------------------------------------------------------------------- Tue Jul 22 06:45:25 UTC 2014 - meissner@suse.com Index: rpm-check.sh =================================================================== --- rpm-check.sh (revision 46d888ad1a897a09583164f906248943) +++ rpm-check.sh (working copy) @@ -136,8 +136,22 @@ return 0 } + +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 </a> or </div> tag will stay also on both files. + 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 + done +} + + check_single_file() -{ +{ local file="$1" case $file in *.spec) @@ -267,9 +281,11 @@ # Generated on Sat Aug 14 2010 16:49:48 for libssh sed -i -e 's|Generated on ... ... [0-9]* 20[0-9][0-9] [0-9]*:[0-9][0-9]:[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f done + strip_numbered_anchors ;; /usr/share/javadoc/*.html |\ /usr/share/javadoc/*/*.html|/usr/share/javadoc/*/*/*.html) + strip_numbered_anchors # There are more timestamps in html, so far we handle only some primitive versions. for f in old/$file new/$file; do # Javadoc: @@ -283,7 +299,7 @@ # deprecated-list is randomly ordered, sort it for comparison case $f in */deprecated-list.html) - sort -o $f $f + sort -o $f $f ;; esac done @@ -369,13 +385,7 @@ /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\ /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2) # various kde and gtk packages - for f in old/$file new/$file; do - sed -i -e 's%name="id[0-9]*"\([> ]\)%name="id424242"\1%g' $f - sed -i -e 's%name="[a-z]*\.id[0-9]*"%name="ftn.id111111"%g' $f - sed -i -e 's%\.html#id[0-9]*"\(/\)\?>%.html#id424242"\1>%g' $f - sed -i -e 's%href="#\([a-z]*\.\)\?id[0-9]*"\([> ]\)%href="#\1id0000000"\2%g' $f - sed -i -e 's%id="\([a-z]*\.\)\?id[0-9]*"\([> ]\)%id="\1id0000000"\2%g' $f - done + strip_numbered_anchors ;; */created.rid) # ruby documentation @@ -389,6 +399,7 @@ for f in old/$file new/$file; do sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f done + strip_numbered_anchors ;; */Linux*Env.Set.sh) # LibreOffice files, contains: -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c3 --- Comment #3 from Bernhard Wiedemann <bwiedemann@suse.com> 2014-08-11 11:00:45 CEST --- This is an autogenerated message for OBS integration: This bug (889629) was mentioned in https://build.opensuse.org/request/show/244163 Tools / build-compare -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=889629 https://bugzilla.novell.com/show_bug.cgi?id=889629#c4 Andreas Jaeger <aj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Andreas Jaeger <aj@suse.com> 2014-08-25 07:27:33 UTC --- Thanks. Submitted to Factory -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com