[Collab-qa-commits] r875 - / potential-removals
lucas at alioth.debian.org
lucas at alioth.debian.org
Mon Jun 2 15:32:21 UTC 2008
Author: lucas
Date: 2008-06-02 15:32:20 +0000 (Mon, 02 Jun 2008)
New Revision: 875
Added:
potential-removals/
potential-removals/Comments
potential-removals/Makefile
potential-removals/find_removals
potential-removals/popcon_src
Log:
added script to find candidates for removal from testing
Added: potential-removals/Comments
===================================================================
--- potential-removals/Comments (rev 0)
+++ potential-removals/Comments 2008-06-02 15:32:20 UTC (rev 875)
@@ -0,0 +1,9 @@
+401209 reopened recently
+415254 reassigned rather recently
+429923 reassigned rather recently
+441719 not built everywhere
+453791 fixed, archived.
+454836 caused by vdr-plugin-live not migrating.
+471385 wengophone not built everywhere
+473943 not built everywhere
+476631 not built everywhere
Added: potential-removals/Makefile
===================================================================
--- potential-removals/Makefile (rev 0)
+++ potential-removals/Makefile 2008-06-02 15:32:20 UTC (rev 875)
@@ -0,0 +1,82 @@
+all: removals-filtered.txt
+
+CHDIST=$$HOME/bin/chdist
+MAXBUG=478000
+MAXPOPCON=1000
+
+MIRROR=http://ftp.de.debian.org/debian
+
+Sources_ok: testing-main-Sources testing-contrib-Sources testing-non-free-Sources unstable-main-Sources unstable-contrib-Sources unstable-non-free-Sources stable-main-Sources stable-contrib-Sources stable-non-free-Sources oldstable-main-Sources oldstable-contrib-Sources oldstable-non-free-Sources experimental-main-Sources experimental-contrib-Sources experimental-non-free-Sources
+ touch Sources_ok
+
+################# SOURCES
+
+experimental-main-Sources:
+ wget -O - ${MIRROR}/dists/experimental/main/source/Sources.gz | gunzip > $@
+
+experimental-contrib-Sources:
+ wget -O - ${MIRROR}/dists/experimental/contrib/source/Sources.gz | gunzip > $@
+
+experimental-non-free-Sources:
+ wget -O - ${MIRROR}/dists/experimental/non-free/source/Sources.gz | gunzip > $@
+
+
+oldstable-main-Sources:
+ wget -O - ${MIRROR}/dists/oldstable/main/source/Sources.gz | gunzip > $@
+
+oldstable-contrib-Sources:
+ wget -O - ${MIRROR}/dists/oldstable/contrib/source/Sources.gz | gunzip > $@
+
+oldstable-non-free-Sources:
+ wget -O - ${MIRROR}/dists/oldstable/non-free/source/Sources.gz | gunzip > $@
+
+
+stable-main-Sources:
+ wget -O - ${MIRROR}/dists/stable/main/source/Sources.gz | gunzip > $@
+
+stable-contrib-Sources:
+ wget -O - ${MIRROR}/dists/stable/contrib/source/Sources.gz | gunzip > $@
+
+stable-non-free-Sources:
+ wget -O - ${MIRROR}/dists/stable/non-free/source/Sources.gz | gunzip > $@
+
+testing-main-Sources:
+ wget -O - ${MIRROR}/dists/testing/main/source/Sources.gz | gunzip > $@
+
+testing-contrib-Sources:
+ wget -O - ${MIRROR}/dists/testing/contrib/source/Sources.gz | gunzip > $@
+
+testing-non-free-Sources:
+ wget -O - ${MIRROR}/dists/testing/non-free/source/Sources.gz | gunzip > $@
+
+unstable-main-Sources:
+ wget -O - ${MIRROR}/dists/unstable/main/source/Sources.gz | gunzip > $@
+
+unstable-contrib-Sources:
+ wget -O - ${MIRROR}/dists/unstable/contrib/source/Sources.gz | gunzip > $@
+
+unstable-non-free-Sources:
+ wget -O - ${MIRROR}/dists/unstable/non-free/source/Sources.gz | gunzip > $@
+
+################# / SOURCES
+
+removals-filtered.txt: removals.txt
+ grep -v -e "^### ignored too recent " -e "^### ignored too popular " removals.txt > removals-filtered.txt
+
+removals.txt: popcon_sources.txt rcbugs.txt Sources_ok
+ ./find_removals rcbugs.txt popcon_sources.txt $(MAXBUG) $(MAXPOPCON) 1 > removals.txt
+
+popcon_sources.txt: Sources_ok
+ ./popcon_src > popcon_sources.txt
+
+rcbugs.txt:
+ ssh merkel "cd fbc && ./real_bugcounts" > rcbugs.txt
+
+clean:
+ rm -f popcon_sources.txt rcbugs.txt *Sources Sources_ok
+
+distclean: clean
+ rm -f dak_* removals-filtered.txt removals.txt
+
+.PHONY: clean distclean
+
Added: potential-removals/find_removals
===================================================================
--- potential-removals/find_removals (rev 0)
+++ potential-removals/find_removals 2008-06-02 15:32:20 UTC (rev 875)
@@ -0,0 +1,72 @@
+#!/usr/bin/ruby -w
+
+def getsource(bin)
+ src = `chdist apt-cache lenny show #{bin} 2>/dev/null | grep "^Source: " | awk '{print $2}'`.chomp
+ if $? != 0
+ return bin
+ end
+ if src == ""
+ return bin
+ else
+ return src
+ end
+end
+maxbug = ARGV[2].to_i
+maxpop = ARGV[3].to_i
+if ARGV[4] == "0"
+ checkdak = false
+else
+ checkdak = true
+end
+
+popcon = {}
+IO::read(ARGV[1]).each_line do |l|
+ next if l =~ /^#/
+ pkg, pop = l.split
+ popcon[pkg] = pop.to_i
+end
+
+IO::read(ARGV[0]).each_line do |l|
+ next if l !~ /^TESTINGUNSTABLE /
+ testing, bug, package, subject = l.split(' ', 4)
+ package.chop! if package =~ /,$/
+ next if [ 'release-notes', 'project', 'ftp.debian.org', 'installation-reports'].include?(package)
+ bug = bug.to_i
+ if bug > maxbug
+ puts "### ignored too recent #{bug}(>#{maxbug}) (#{package}): #{subject}"
+ next
+ end
+ src = getsource(package)
+ if popcon[src].nil?
+ puts "### ignored unknown popcon #{bug} (#{package},#{src}): #{subject}"
+ next
+ end
+ if popcon[src] > maxpop
+ puts "### ignored too popular #{bug} (#{package},#{src}) (popcon: #{popcon[src]}>#{maxpop}): #{subject}"
+ next
+ end
+ if checkdak
+ if not File::exists?("dak_#{src}")
+ system("ssh merkel \"dak rm --suite=testing -Rn #{src}\" > dak_#{src}")
+ end
+ dak = IO::read("dak_#{src}")
+ end
+ version = `chdist apt-cache lenny showsrc #{src} | grep "^Version: " | awk '{print $2}'`.chomp
+ if checkdak and dak !~ /^No dependency problem found.$/
+ puts "### ignored because of dak #{bug} (#{package},#{src}) (see dak_#{src} ): #{subject}"
+ puts "##### #{bug} #{package} #{subject}"
+ puts "##### popcon: #{popcon[src]}"
+ puts "#### #{bug}"
+ puts "###remove #{src}/#{version}"
+ puts
+ else
+ puts "## #{bug} #{package} #{subject}"
+ puts "## popcon: #{popcon[src]}"
+ puts "# #{bug}"
+ puts "remove #{src}/#{version}"
+ puts
+ end
+ STDOUT.flush
+end
+
+
Property changes on: potential-removals/find_removals
___________________________________________________________________
Name: svn:executable
+ *
Added: potential-removals/popcon_src
===================================================================
--- potential-removals/popcon_src (rev 0)
+++ potential-removals/popcon_src 2008-06-02 15:32:20 UTC (rev 875)
@@ -0,0 +1,54 @@
+#!/usr/bin/ruby -w
+
+# hash for bin->src resolution
+$srcpkg = {}
+
+# hash for src->bins resolution
+$pkgs = {}
+
+# read *-Sources and feed $srcpkg and $pkgs
+def read_sources
+ Dir::glob('{testing,unstable}-*-Sources') do |s|
+ src = nil
+ IO::read(s).each_line do |l|
+ if l =~ /^Package:/
+ src = l.split(' ')[1].chomp
+ $pkgs[src] = [] if $pkgs[src].nil?
+ elsif l =~ /^Binary:/
+ l.split(' ',2)[1].split(', ').each do |b|
+ b.chomp!
+ if $srcpkg[b].nil? # else, we already know that binary pkg
+ $srcpkg[b] = src
+ $pkgs[src] << b
+ end
+ end
+ end
+ end
+ end
+end
+
+read_sources
+
+popcon = {}
+`wget -q -O /dev/stdout http://popcon.debian.org/by_inst`.each_line do |l|
+ l.chomp!
+ next if l =~ /^#/
+ next if l =~ /^-----/
+ t = l.split
+ next if t[1] == "Total"
+ src = $srcpkg[t[1]]
+ next if src.nil?
+ puts "# #{src} #{t[2..-1].join(' ')}"
+ insts = t[2].to_i
+ if popcon[src]
+ if popcon[src] < insts
+ popcon[src] = insts
+ end
+ else
+ popcon[src] = insts
+ end
+end
+
+popcon.to_a.sort { |a,b| a[1] <=> b[1] }.reverse.each do |e|
+ puts e.join(' ')
+end
Property changes on: potential-removals/popcon_src
___________________________________________________________________
Name: svn:executable
+ *
More information about the Collab-qa-commits
mailing list