Accepting request 102853 from home:a_jaeger:branches:build-compare-test
Improve handling of manpages and rpmlint files. OBS-URL: https://build.opensuse.org/request/show/102853 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=115
This commit is contained in:
parent
de1e1ea413
commit
a01c32558f
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 12:16:49 UTC 2012 - aj@suse.de
|
||||
|
||||
- Improve rpmlint check.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 12:11:35 UTC 2012 - aj@suse.de
|
||||
|
||||
- Take care of date format change of unzip.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 10:43:49 UTC 2012 - aj@suse.de
|
||||
|
||||
- Replace all occurences of release in rpmlint, take care of
|
||||
temporary files in rpmlint
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 5 09:23:56 UTC 2012 - aj@suse.de
|
||||
|
||||
- Use separate invocation lines for .TH lines to catch
|
||||
some better.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 26 10:01:55 UTC 2012 - aj@suse.de
|
||||
|
||||
|
14
rpm-check.sh
14
rpm-check.sh
@ -190,9 +190,12 @@ check_single_file()
|
||||
unjar_l ./$file |sort > flist
|
||||
# 10-05-2010 14:39
|
||||
sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ," flist
|
||||
# 2012-02-03 07:59
|
||||
sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
|
||||
cd ../new
|
||||
unjar_l ./$file |sort> flist
|
||||
sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ,; " flist
|
||||
sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
|
||||
cd ..
|
||||
if ! cmp -s old/flist new/flist; then
|
||||
echo "$file has different file list"
|
||||
@ -318,14 +321,21 @@ check_single_file()
|
||||
# .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
|
||||
# .TH "OFFLINEIMAP" "1" "11 May 2010" "John Goerzen" "OfflineIMAP Manual"
|
||||
# .TH gv 3guile "13 May 2010"
|
||||
# .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands"
|
||||
#.TH "GIT\-ARCHIMPORT" "1" "09/13/2010" "Git 1\&.7\&.1" "Git Manual"
|
||||
# .TH LDIRECTORD 8 "2010-10-20" "perl v5.12.2" "User Contributed Perl Documentation"
|
||||
|
||||
for f in old/$file new/$file; do
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?\(20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]\|[A-Z][a-z]* [0-9][0-9], 20[0-9][0-9]\|[0-9]* [A-Z][a-z]* 20[0-9][0-9]\|[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ 20[0-9][0-9]\|[A-Z][a-z]* 20[0-9][0-9]\)"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?\(20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]\|[0-9]* [A-Z][a-z]* 20[0-9][0-9]\)"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?\([0-1][0-9]/[0-9][0-9]/201[0-9]\)"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
sed -i -e 's|.TH \(.*\) "\?\(20[0-1][0-9]-[0-9][0-9]-[0-9][0-9]\)"\? |.TH \1 "2000-01-01" |' $f
|
||||
# .TH ccmake 1 "February 05, 2012" "ccmake 2.8.7"
|
||||
sed -i -e 's|^.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?\([A-Z][a-z]* [0-9][0-9], 20[0-9][0-9]\)"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
# .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ 20[0-9][0-9]"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
# .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands"
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?[A-Z][a-z]* 20[0-9][0-9]"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
# .TH "GCM-CALIBRATE" "1" "03 February 2012" "" ""
|
||||
sed -i -e 's|.TH "\?\([^ "]*\)"\? "\?\([0-9][a-z]*\)"\? "\?[0-9]* [A-Z][a-z]* 20[0-9][0-9]"\? |.TH \1 \2 "2000-01-01" |' $f
|
||||
# generated by docbook xml:
|
||||
#.\" Date: 09/13/2010
|
||||
sed -i -e 's|Date: [0-1][0-9]/[0-9][0-9]/201[0-9]|Date: 09/13/2010|' $f
|
||||
|
@ -98,11 +98,14 @@ if test -e $OLDDIR/rpmlint.log -a -e $RPMLINTDIR/rpmlint.log; then
|
||||
echo "comparing $OLDDIR/rpmlint.log and $RPMLINTDIR/rpmlint.log"
|
||||
# Sort the files first since the order of messages is not deterministic
|
||||
# Remove release from files
|
||||
sort -u $OLDDIR/rpmlint.log|sed -e "s,$release1, @RELEASE@," > $file1
|
||||
sort -u $RPMLINTDIR/rpmlint.log|sed -e "s,$release2, @RELEASE@," > $file2
|
||||
echo "Release1 is $release1, Release2 is $release2"
|
||||
sort -u $OLDDIR/rpmlint.log|sed -e "s,$release1,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
|
||||
sort -u $RPMLINTDIR/rpmlint.log|sed -e "s,$release2,@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
|
||||
if ! cmp -s $file1 $file2; then
|
||||
echo "rpmlint.log files differ:"
|
||||
diff -u $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log|head -n 20
|
||||
# File is sorted, so don't give context that will confuse readers
|
||||
diff -u0 $file1 $file2 |head -n 20
|
||||
#diff -u $OLDDIR/rpmlint.log $RPMLINTDIR/rpmlint.log|head -n 20
|
||||
SUCCESS=0
|
||||
fi
|
||||
rm $file1 $file2
|
||||
|
Loading…
Reference in New Issue
Block a user