Author: gothicx-guest Date: 2011-01-08 17:28:15 +0000 (Sat, 08 Jan 2011) New Revision: 1881
Removed: bapase/bugs_rm_pkgs.rb Log: This script is now at UDD scripts database Deleted: bapase/bugs_rm_pkgs.rb =================================================================== --- bapase/bugs_rm_pkgs.rb 2011-01-08 12:01:59 UTC (rev 1880) +++ bapase/bugs_rm_pkgs.rb 2011-01-08 17:28:15 UTC (rev 1881) @@ -1,109 +0,0 @@ -#!/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', 'bugs.debian.org', 'lists.debian.org', -'wnpp', 'cdimage.debian.org', 'tech-ctte', 'mirrors', 'security.debian.org', -'installation-reports', 'upgrade-reports', 'release-notes', 'wiki.debian.org', 'security-tracker', 'release.debian.org', 'debian-policy', 'debian-i18n', 'buildd.emdebian.org', 'buildd.debian.org' ] - -EXCLUDED = [ - /^(linux|kernel)-(image|source)-/, # we don't care about those bugs for now -] - -#STDERR.puts "#{Time::now} Reading LDAP dump" -bugid = nil -bugsrcpkg = nil -bugpkg = nil -bugtitle = nil -bugstate = nil -bugaffect = [] - -ibugs = [] -IO::read('bts2ldap-fullindex').each_line do |l| - l.chomp! - key, val = l.split(' ', 2) - if key == 'dn:' and bugid != nil - # fin du bug en cours - if not (bugaffect.include?('unstable') or bugaffect.include?('testing') or bugaffect.include?('experimental')) and bugstate != 'done' and not PSEUDO_PKGS.include?(bugpkg) - ibugs << [bugid, bugpkg, bugsrcpkg, bugtitle] - end - - bugid = nil - bugsrcpkg = nil - bugpkg = nil - bugtitle = nil - bugstate = nil - bugaffect = [] - bugaffect = [] - - elsif key == 'debbugsID:' - bugid = val - elsif key == 'debbugsSourcePackage:' - bugsrcpkg = val - elsif key == 'debbugsPackage:' - bugpkg = val - elsif key == 'debbugsState:' - bugstate = val - elsif key == 'debbugsTitle:' - bugtitle = val - elsif key == 'debbugsAffected:' - bugaffect << val - end -end - -#STDERR.puts "#{Time::now} End reading LDAP dump" -#STDERR.puts "#{Time::now} Reading *Sources" -f = [] -[ 'testing-*-Sources', 'unstable-*-Sources', 'experimental-*-Sources'].each do |m| - f += Dir::glob(m) -end -srcs = {} -bins = {} -f.each do |s| - IO::read(s).each_line do |l| - if l =~ /^Package: / - srcs[l.chomp.split(' ')[1]] = true - elsif l =~ /^Binary: / - l.chomp.split(' ',2)[1].split(/, /).each do |b| - bins[b] = true - end - 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.chomp.split(' ')[1]] = true - elsif l =~ /^Binary: / - l.chomp.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]] - - 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 _______________________________________________ Collab-qa-commits mailing list Collab-qa-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/collab-qa-commits