[Collab-qa-commits] r862 - bapase

lucas at alioth.debian.org lucas at alioth.debian.org
Thu May 29 11:21:14 UTC 2008


Author: lucas
Date: 2008-05-29 11:21:13 +0000 (Thu, 29 May 2008)
New Revision: 862

Modified:
   bapase/bugs_rm_pkgs.rb
Log:
bugs_rm_pkgs.rb improvements

Modified: bapase/bugs_rm_pkgs.rb
===================================================================
--- bapase/bugs_rm_pkgs.rb	2008-05-29 11:11:43 UTC (rev 861)
+++ bapase/bugs_rm_pkgs.rb	2008-05-29 11:21:13 UTC (rev 862)
@@ -1,8 +1,18 @@
 #!/usr/bin/ruby -w
 
 # see merkel:/org/bugs.debian.org/etc/pseudo-packages.description
-PSEUDO_PKGS = ['base', 'cdrom', 'spam', 'press', 'kernel', 'project', 'general', 'listarchives', 'nm.debian.org', 'qa.debian.org', 'ftp.debian.org', 'www.debian.org', 'wiki.debian.org', 'bugs.debian.org', 'lists.debian.org', 'wnpp', 'cdimage.debian.org', 'tech-ctte', 'mirrors', 'security.debian.org', 'security-tracker', 'installation-reports', 'upgrade-reports', 'release-notes', 'release.debian.org']
+PSEUDO_PKGS = ['base', 'cdrom', 'spam', 'press', 'kernel', 'project',
+'general', 'listarchives', 'nm.debian.org', 'qa.debian.org',
+'ftp.debian.org', 'www.debian.org', 'bugs.debian.org', 'lists.debian.org',
+'wnpp', 'cdimage.debian.org', 'tech-ctte', 'mirrors', 'security.debian.org',
+'installation-reports', 'upgrade-reports', 'release-notes' ]
 
+EXCLUDED = [
+  /^wiki.debian.org$/, # pseudo-package not listed on merkel?
+  /^release.debian.org$/, # pseudo-package not listed on merkel?
+  /^security-tracker$/, # pseudo-package not listed on merkel?
+]
+
 #STDERR.puts "#{Time::now} Reading LDAP dump"
 bugid = nil
 bugsrcpkg = nil
@@ -63,9 +73,39 @@
     end
   end
 end
+## reading stable sources
+f = Dir::glob('stable-*-Sources')
+stablesrcs = {}
+stablebins = {}
+f.each do |s|
+  IO::read(s).each_line do |l|
+    if l =~ /^Package: /
+      stablesrcs[l.split(' ')[1]] = true
+    elsif l =~ /^Binary: /
+      l.split(' ',2)[1].split(/, /).each do |b|
+        stablebins[b] = true
+      end
+    end
+  end
+end
+#
 #STDERR.puts "#{Time::now} End reading *Sources"
+
 ibugs.each do |l|
   # could be made stricter at some point
   next if srcs[l[2]] or bins[l[1]] or srcs[l[1]] or bins[l[2]]
-  puts l.join(' ')
+
+  tags = ""
+  if stablebins[l[1]] or stablesrcs[l[2]] or stablebins[l[2]] or stablesrcs[l[1]]
+    tags += " IN_STABLE"
+  end
+
+  excluded = false
+  EXCLUDED.each do |re|
+    if l[1] =~ re or l[2] =~ re
+      excluded = true
+    end
+  end
+  tags += " EXCLUDED" if excluded
+  puts l.join(' ') + tags
 end




More information about the Collab-qa-commits mailing list