/[collab-qa]/potential-removals/find_removals
ViewVC logotype

Contents of /potential-removals/find_removals

Parent Directory Parent Directory | Revision Log Revision Log


Revision 875 - (show annotations) (download)
Mon Jun 2 15:32:20 2008 UTC (4 years, 11 months ago) by lucas
File size: 1903 byte(s)
added script to find candidates for removal from testing
1 #!/usr/bin/ruby -w
2
3 def getsource(bin)
4 src = `chdist apt-cache lenny show #{bin} 2>/dev/null | grep "^Source: " | awk '{print $2}'`.chomp
5 if $? != 0
6 return bin
7 end
8 if src == ""
9 return bin
10 else
11 return src
12 end
13 end
14 maxbug = ARGV[2].to_i
15 maxpop = ARGV[3].to_i
16 if ARGV[4] == "0"
17 checkdak = false
18 else
19 checkdak = true
20 end
21
22 popcon = {}
23 IO::read(ARGV[1]).each_line do |l|
24 next if l =~ /^#/
25 pkg, pop = l.split
26 popcon[pkg] = pop.to_i
27 end
28
29 IO::read(ARGV[0]).each_line do |l|
30 next if l !~ /^TESTINGUNSTABLE /
31 testing, bug, package, subject = l.split(' ', 4)
32 package.chop! if package =~ /,$/
33 next if [ 'release-notes', 'project', 'ftp.debian.org', 'installation-reports'].include?(package)
34 bug = bug.to_i
35 if bug > maxbug
36 puts "### ignored too recent #{bug}(>#{maxbug}) (#{package}): #{subject}"
37 next
38 end
39 src = getsource(package)
40 if popcon[src].nil?
41 puts "### ignored unknown popcon #{bug} (#{package},#{src}): #{subject}"
42 next
43 end
44 if popcon[src] > maxpop
45 puts "### ignored too popular #{bug} (#{package},#{src}) (popcon: #{popcon[src]}>#{maxpop}): #{subject}"
46 next
47 end
48 if checkdak
49 if not File::exists?("dak_#{src}")
50 system("ssh merkel \"dak rm --suite=testing -Rn #{src}\" > dak_#{src}")
51 end
52 dak = IO::read("dak_#{src}")
53 end
54 version = `chdist apt-cache lenny showsrc #{src} | grep "^Version: " | awk '{print $2}'`.chomp
55 if checkdak and dak !~ /^No dependency problem found.$/
56 puts "### ignored because of dak #{bug} (#{package},#{src}) (see dak_#{src} ): #{subject}"
57 puts "##### #{bug} #{package} #{subject}"
58 puts "##### popcon: #{popcon[src]}"
59 puts "#### #{bug}"
60 puts "###remove #{src}/#{version}"
61 puts
62 else
63 puts "## #{bug} #{package} #{subject}"
64 puts "## popcon: #{popcon[src]}"
65 puts "# #{bug}"
66 puts "remove #{src}/#{version}"
67 puts
68 end
69 STDOUT.flush
70 end
71
72

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5