Add support for suppressing warnings we don't care about
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 19 Sep 2008 11:16:21 +0000 (07:16 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 19 Sep 2008 11:16:21 +0000 (07:16 -0400)
atk/compare.supp [new file with mode: 0644]
binutils/compare.supp [new file with mode: 0644]
compare/compare.py
compare/compare.sh
gdb/compare.supp [new file with mode: 0644]
glib2/compare.supp [new file with mode: 0644]
gnutls/compare.supp [new file with mode: 0644]
gtk2/compare.supp [new file with mode: 0644]
jasper/compare.supp [new file with mode: 0644]
libjpeg/compare.supp [new file with mode: 0644]
zlib/compare.supp [new file with mode: 0644]

diff --git a/atk/compare.supp b/atk/compare.supp
new file mode 100644 (file)
index 0000000..91efa7d
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'atk-1.23.5-mingw.patch'
diff --git a/binutils/compare.supp b/binutils/compare.supp
new file mode 100644 (file)
index 0000000..ea6bd56
--- /dev/null
@@ -0,0 +1,4 @@
+different version: 'binutils': '2.18.50.0.9' != 'mingw-binutils': '2.18.50_20080109_2'
+different URL: 'binutils': 'http://sources.redhat.com/binutils' != 'mingw-binutils': 'http://www.mingw.org/'
+missing source: 'binutils-2.18.50.0.9.tar.bz2'
+extra source: 'binutils-2.18.50-20080109-2-src.tar.gz'
index adb2ccb..a10aba6 100644 (file)
@@ -3,10 +3,13 @@
 import sys
 from tempfile import mkdtemp
 from os import mkdir, system
+import os.path
 import rpm
 
 
 def compare_header(refspec, altspec):
+    warnings = []
+
     refhdr = refspec.packages()[0].header()
     althdr = altspec.packages()[0].header()
 
@@ -23,15 +26,18 @@ def compare_header(refspec, altspec):
     alturl = althdr[rpm.RPMTAG_URL]
 
     if refver != altver:
-        print "WARNING: different version: '%s': '%s' != '%s': '%s'" % (refname, refver, altname, altver)
+        warnings.append("different version: '%s': '%s' != '%s': '%s'" % (refname, refver, altname, altver))
 
     if refver != altver:
-        print "WARNING: different license: '%s': '%s' != '%s': '%s'" % (refname, reflic, altname, altlic)
+        warnings.append("different license: '%s': '%s' != '%s': '%s'" % (refname, reflic, altname, altlic))
 
     if refver != altver:
-        print "WARNING: different URL: '%s': '%s' != '%s': '%s'" % (refname, refurl, altname, alturl)
+        warnings.append("different URL: '%s': '%s' != '%s': '%s'" % (refname, refurl, altname, alturl))
+
+    return warnings
 
 def compare_sources(refspec, altspec):
+    warnings = []
     refsrc = []
     altsrc = []
     refsrcname = []
@@ -65,20 +71,23 @@ def compare_sources(refspec, altspec):
 
     for s in refsrc:
         if not s[1] in altsrcname:
-            print "WARNING: missing source: '%s'" % s[1]
+            warnings.append("missing source: '%s'" % s[1])
     for s in altsrc:
         if not s[1] in refsrcname:
-            print "WARNING: extra source: '%s'" % s[1]
+            warnings.append("extra source: '%s'" % s[1])
 
     for s1 in refsrc:
         for s2 in altsrc:
             if s1[1] != s2[1]:
                 continue
             if s1[0] != s2[0]:
-                print "WARNING: different base URI for source '%s': '%s' != '%s'" % (s1[1], s1[0], s2[0])
+                warnings.append("different base URI for source '%s': '%s' != '%s'" % (s1[1], s1[0], s2[0]))
+
+    return warnings
 
 
 def compare_patches(refspec, altspec):
+    warnings = []
     refpatch = []
     altpatch = []
     for src in refspec.sources():
@@ -90,27 +99,68 @@ def compare_patches(refspec, altspec):
 
     for p in refpatch:
         if not p in altpatch:
-            print "WARNING missing patch '%s'" % p
+            warnings.append("missing patch '%s'" % p)
 
     for p in altpatch:
         if not p in refpatch:
-            print "WARNING extra patch '%s'" % p
+            warnings.append("extra patch '%s'" % p)
+
+    return warnings
+
+
+def compare_specs(refspec, altspec):
+    warnings = []
+
+    for w in compare_header(refspec, altspec):
+        warnings.append(w)
+    for w in compare_sources(refspec, altspec):
+        warnings.append(w)
+    for w in compare_patches(refspec, altspec):
+        warnings.append(w)
+
+    return warnings
+
+def load_suppressions(file):
+    if not os.path.exists(file):
+        return []
+
+    supp = []
+    s = open(suppressionfile)
+    try:
+        while 1:
+            line = s.readline()
+            if not line:
+                break;
+
+            line = line[0:-1]
+            supp.append(line)
+    finally:
+        s.close()
+
+    return supp
+
+
 
 scratchdir = mkdtemp("rpm-source-compare")
 
-if len(sys.argv) != 3:
-    print "syntax: %s REFERENCE-SPEC ALTERNATE-SPEC" % sys.argv[0]
+if len(sys.argv) != 4:
+    print "syntax: %s REFERENCE-SPEC ALTERNATE-SPEC SUPPRESSIONS" % sys.argv[0]
     sys.exit(1)
 
 refspecfile = sys.argv[1]
 altspecfile = sys.argv[2]
+suppressionfile = sys.argv[3]
 
 ts = rpm.ts()
 
 refspec = ts.parseSpec(refspecfile)
 altspec = ts.parseSpec(altspecfile)
+suppressions = load_suppressions(suppressionfile)
+
+
+warnings = compare_specs(refspec, altspec)
 
-compare_header(refspec, altspec)
-compare_sources(refspec, altspec)
-compare_patches(refspec, altspec)
 
+for w in warnings:
+    if not w in suppressions:
+        print "WARNING %s" % w
index 4ad66a6..78aa023 100644 (file)
@@ -4,15 +4,31 @@ for i in */*.spec
 do
   module=`dirname $i`
 
+  if [ "$module" == "portablexdr" ]; then continue ; fi
+  if [ "$module" == "example" ]; then continue ; fi
+  if [ "$module" == "filesystem" ]; then continue ; fi
+  if [ "$module" == "iconv" ]; then continue ; fi
+  if [ "$module" == "nsis" ]; then continue ; fi
+  if [ "$module" == "runtime" ]; then continue ; fi
+  if [ "$module" == "runtime-bootstrap" ]; then continue ; fi
+  if [ "$module" == "w32api" ]; then continue ; fi
+  if [ "$module" == "w32api-bootstrap" ]; then continue ; fi
+  
+
   echo "------------------------------------------------------"
   echo "Compare $module"
 
-  reference=$HOME/src/fedora/$module/devel/$module.spec
+  if [ "$module" == "gcc" ]; then
+    reference=$HOME/src/fedora/$module/devel/gcc43.spec
+  else
+    reference=$HOME/src/fedora/$module/devel/$module.spec
+  fi
+  suppression=$module/compare.supp
   if [ ! -f $reference ]
   then
       echo "Missing reference module $reference"
   else
-    python compare/compare.py $reference $i
+      python compare/compare.py $reference $i $suppression
   fi
   echo
 done
diff --git a/gdb/compare.supp b/gdb/compare.supp
new file mode 100644 (file)
index 0000000..7aa7d56
--- /dev/null
@@ -0,0 +1,128 @@
+missing source: 'gdb-gstack.man'
+missing source: 'gdb-orphanripper.c'
+different base URI for source 'gdb-6.8.tar.bz2': 'ftp://sourceware.org/pub/gdb/releases' != 'http://dl.sourceforge.net/sourceforge/mingw'
+missing patch 'gdb-6.8-breakpoint-gone.patch'
+missing patch 'gdb-6.8-attach-signalled-detach-stopped.patch'
+missing patch 'gdb-6.8-attach-signalled-upstream.patch'
+missing patch 'gdb-6.8-ctors-dtors-unique.patch'
+missing patch 'gdb-6.8-fortran-module-ignore.patch'
+missing patch 'gdb-6.8-fortran-tag-constant.patch'
+missing patch 'gdb-6.8-quit-never-aborts.patch'
+missing patch 'gdb-6.8-bz436037-reg-no-longer-active.patch'
+missing patch 'gdb-6.8-bz254229-gcore-prpsinfo.patch'
+missing patch 'gdb-6.8-inlining-by-name.patch'
+missing patch 'gdb-6.8-inlining.patch'
+missing patch 'gdb-6.8-tui-singlebinary.patch'
+missing patch 'gdb-6.8-forced-enable-tui.patch'
+missing patch 'gdb-6.8-glibc-headers-compat.patch'
+missing patch 'gdb-6.8-disable-randomization.patch'
+missing patch 'gdb-6.8-constant-watchpoints.patch'
+missing patch 'gdb-6.8-auto-dependencies.patch'
+missing patch 'gdb-6.5-section-num-fixup-test.patch'
+missing patch 'gdb-6.8-gcc35998-ada-memory-trash.patch'
+missing patch 'gdb-6.8-sparc64-silence-memcpy-check.patch'
+missing patch 'gdb-6.8-sparc-fix.patch'
+missing patch 'gdb-6.8-bz442765-threaded-exec-test.patch'
+missing patch 'gdb-6.3-watchpoint-cond-gone-test.patch'
+missing patch 'gdb-6.3-focus-cmd-prev-test.patch'
+missing patch 'gdb-6.3-mapping-zero-inode-test.patch'
+missing patch 'gdb-6.8-watchpoint-inaccessible-memory.patch'
+missing patch 'gdb-6.8-bz377541-fortran-dynamic-arrays.patch'
+missing patch 'gdb-6.7-kernel-headers-compat.patch'
+missing patch 'gdb-6.6-buildid-readnever-silent.patch'
+missing patch 'gdb-6.6-threads-static-test.patch'
+missing patch 'gdb-6.5-gcore-buffer-limit-test.patch'
+missing patch 'gdb-6.7-bz426600-DW_TAG_interface_type-test.patch'
+missing patch 'gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch'
+missing patch 'gdb-6.5-missed-trap-on-step-test.patch'
+missing patch 'gdb-6.5-ia64-libunwind-leak-test.patch'
+missing patch 'gdb-6.7-testsuite-stable-results.patch'
+missing patch 'gdb-6.7-ppc-clobbered-registers-O2-test.patch'
+missing patch 'gdb-6.7-reread-exec_bfd.patch'
+missing patch 'gdb-6.7-charsign-test.patch'
+missing patch 'gdb-6.6-multifork-debugreg.patch'
+missing patch 'gdb-6.6-vdso-i386-on-amd64-warning.patch'
+missing patch 'gdb-6.6-buildid-locate.patch'
+missing patch 'gdb-6.5-bz243845-stale-testing-zombie-test.patch'
+missing patch 'gdb-6.6-bz247354-leader-exit-test.patch'
+missing patch 'gdb-6.6-bz247354-leader-exit-fix.patch'
+missing patch 'gdb-6.3-attach-see-vdso-test.patch'
+missing patch 'gdb-6.6-readline-system.patch'
+missing patch 'gdb-6.6-bz237572-ppc-atomic-sequence-test.patch'
+missing patch 'gdb-6.6-testsuite-timeouts.patch'
+missing patch 'gdb-6.6-gcore32-test.patch'
+missing patch 'gdb-6.6-bz235197-fork-detach-info.patch'
+missing patch 'gdb-6.6-bz229517-gcore-without-terminal.patch'
+missing patch 'gdb-6.6-bz225783-gdb-debuginfo-paths.patch'
+missing patch 'gdb-6.6-bz225783-prelink-path.patch'
+missing patch 'gdb-6.3-bz231832-obstack-2gb.patch'
+missing patch 'gdb-6.6-bz230000-power6-disassembly-test.patch'
+missing patch 'gdb-6.8-upstream.patch'
+missing patch 'gdb-6.3-bz202689-exec-from-pthread-test.patch'
+missing patch 'gdb-6.3-bz140532-ppc-unwinding-test.patch'
+missing patch 'gdb-6.5-bz109921-DW_AT_decl_file-test.patch'
+missing patch 'gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch'
+missing patch 'gdb-6.5-bz218379-ppc-solib-trampoline-test.patch'
+missing patch 'gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch'
+missing patch 'gdb-6.5-bz216711-clone-is-outermost.patch'
+missing patch 'gdb-6.5-readline-long-line-crash-test.patch'
+missing patch 'gdb-6.5-readline-long-line-crash.patch'
+missing patch 'gdb-6.5-BEA-testsuite.patch'
+missing patch 'gdb-6.5-last-address-space-byte-test.patch'
+missing patch 'gdb-6.5-gcore-i386-on-amd64.patch'
+missing patch 'gdb-6.5-bz181390-memory-address-width.patch'
+missing patch 'gdb-6.5-bz190810-gdbserver-arch-advice.patch'
+missing patch 'gdb-6.5-sharedlibrary-path.patch'
+missing patch 'gdb-6.5-tls-of-separate-debuginfo.patch'
+missing patch 'gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch'
+missing patch 'gdb-6.5-dwarf-stack-overflow.patch'
+missing patch 'gdb-6.5-bz203661-emit-relocs.patch'
+missing patch 'gdb-6.5-bz196439-valgrind-memcheck-compat-test.patch'
+missing patch 'gdb-6.3-ia32el-fix-waitpid-20060615.patch'
+missing patch 'gdb-6.3-catch-debug-registers-error-20060527.patch'
+missing patch 'gdb-6.3-gstack-without-path-20060414.patch'
+missing patch 'gdb-6.3-large-core-20051206.patch'
+missing patch 'gdb-6.3-bt-past-zero-20051201.patch'
+missing patch 'gdb-6.3-ia64-sigill-20051115.patch'
+missing patch 'gdb-6.3-ia64-sigtramp-fp-20050926.patch'
+missing patch 'gdb-6.3-readnever-20050907.patch'
+missing patch 'gdb-6.3-inheritancetest-20050726.patch'
+missing patch 'gdb-6.3-ia64-info-frame-fix-20050725.patch'
+missing patch 'gdb-6.3-inferior-notification-20050721.patch'
+missing patch 'gdb-6.3-ia64-gcore-speedup-20050714.patch'
+missing patch 'gdb-6.3-ia64-sigtramp-frame-20050708.patch'
+missing patch 'gdb-6.3-security-errata-20050610.patch'
+missing patch 'gdb-6.3-ia64-gcore-page0-20050421.patch'
+missing patch 'gdb-6.3-sepcrc-20050402.patch'
+missing patch 'gdb-6.3-test-sepcrc-20050402.patch'
+missing patch 'gdb-6.3-inheritance-20050324.patch'
+missing patch 'gdb-6.3-warnings-20050317.patch'
+missing patch 'gdb-6.3-threaded-watchpoints2-20050225.patch'
+missing patch 'gdb-6.3-terminal-fix-20050214.patch'
+missing patch 'gdb-6.3-step-thread-exit-20050211-test.patch'
+missing patch 'gdb-6.6-step-thread-exit.patch'
+missing patch 'gdb-6.3-gcore-thread-20050204.patch'
+missing patch 'gdb-6.3-dwattype0-20050201.patch'
+missing patch 'gdb-6.3-test-movedir-20050125.patch'
+missing patch 'gdb-6.3-dtorfix-20050121.patch'
+missing patch 'gdb-6.3-test-dtorfix-20050121.patch'
+missing patch 'gdb-6.3-nonthreaded-wp-20050117.patch'
+missing patch 'gdb-6.3-test-self-20050110.patch'
+missing patch 'gdb-6.3-pie-20050110.patch'
+missing patch 'gdb-6.3-test-pie-20050107.patch'
+missing patch 'gdb-6.3-type-fix-20041213.patch'
+missing patch 'gdb-6.3-gstack-20050411.patch'
+missing patch 'gdb-6.3-removebp-20041130.patch'
+missing patch 'gdb-6.3-linespec-20041213.patch'
+missing patch 'gdb-6.6-scheduler_locking-step-is-default.patch'
+missing patch 'gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch'
+missing patch 'gdb-6.3-ppc64displaysymbol-20041124.patch'
+missing patch 'gdb-6.3-framepczero-20040927.patch'
+missing patch 'gdb-6.3-ppc64syscall-20040622.patch'
+missing patch 'gdb-6.3-ppcdotsolib-20041022.patch'
+missing patch 'gdb-6.3-sigx86-20040621.patch'
+missing patch 'gdb-6.3-rh-testlibunwind1fix-20041202.patch'
+missing patch 'gdb-6.3-rh-testlibunwind-20041202.patch'
+missing patch 'gdb-6.3-rh-testversion-20041202.patch'
+missing patch 'gdb-6.3-rh-dummykfail-20041202.patch'
+extra patch 'mingw-gdb-6.8-no-getcwd-error.patch'
diff --git a/glib2/compare.supp b/glib2/compare.supp
new file mode 100644 (file)
index 0000000..03314ee
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'glib2.csh'
+missing source: 'glib2.sh'
diff --git a/gnutls/compare.supp b/gnutls/compare.supp
new file mode 100644 (file)
index 0000000..44160e7
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'libgnutls-config'
+extra patch 'gnutls-certtool-build.patch'
diff --git a/gtk2/compare.supp b/gtk2/compare.supp
new file mode 100644 (file)
index 0000000..22255eb
--- /dev/null
@@ -0,0 +1,2 @@
+missing source: 'update-gtk-immodules'
+missing source: 'update-gdk-pixbuf-loaders'
diff --git a/jasper/compare.supp b/jasper/compare.supp
new file mode 100644 (file)
index 0000000..aaa49e1
--- /dev/null
@@ -0,0 +1,3 @@
+extra patch 'jasper-1.900.1-enable-shared.patch'
+extra patch 'jasper-1.900.1-mingw.patch'
+extra patch 'jasper-1.900.1-sleep.patch'
diff --git a/libjpeg/compare.supp b/libjpeg/compare.supp
new file mode 100644 (file)
index 0000000..26c9432
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'jpeg-mingw.patch'
diff --git a/zlib/compare.supp b/zlib/compare.supp
new file mode 100644 (file)
index 0000000..a2b588c
--- /dev/null
@@ -0,0 +1 @@
+extra patch 'zlib-win32.patch'