Author: atomo64-guest Date: 2009-06-09 21:02:24 +0000 (Tue, 09 Jun 2009) New Revision: 1471
Modified: ddpo-by-mail/Makefile ddpo-by-mail/bugs.rb ddpo-by-mail/ddpo-config.rb ddpo-by-mail/reminder-mail.rb Log: Stop using btsldap, retrieve all the data directly from UDD, know about stable bugs Modified: ddpo-by-mail/Makefile =================================================================== --- ddpo-by-mail/Makefile 2009-06-09 17:09:49 UTC (rev 1470) +++ ddpo-by-mail/Makefile 2009-06-09 21:02:24 UTC (rev 1471) @@ -1,6 +1,6 @@ #!/usr/bin/make -f -UPDATE_TARGETS:=bts2ldap_fullindex ddpo_packages ddpo_maintainers testing-status.raw dehs.txt ood_excuses.txt pts_subscriptions.txt wnpp_rm lintian-list.txt debian-installer/all +UPDATE_TARGETS:=ddpo_packages ddpo_maintainers testing-status.raw dehs.txt ood_excuses.txt pts_subscriptions.txt wnpp_rm lintian-list.txt debian-installer/all bugs_stable.txt bugs_unstable.txt ARCHITECTURES:=alpha,amd64,armel,hppa,hurd-i386,i386,ia64,mips,mipsel,powerpc,s390,sparc #ARCHITECTURES:=$(shell dpkg-architecture -L | tr "\n" ",") LOCAL_MIRROR:=/org/ftp.debian.org/ftp @@ -8,6 +8,9 @@ DI_PATH:=dists/sid/main/debian-installer WGET_OPTIONS:=-nv -N WGET:=wget $(WGET_OPTIONS) +SSH_UDD_ACCESS_HOST := alioth.debian.org +USERTAGS_EMAILS:=debian-rele...@lists.debian.org;debian...@lists.debian.org;debian-i...@lists.debian.org;initscripts-ng-de...@lists.alioth.debian.org +TAGS:=lfs;ipv6 DATA_DIR:=data FORCE:= @@ -19,10 +22,6 @@ update: $(DATA_DIR) @cd $(DATA_DIR) && $(MAKE) -f ../Makefile FORCE=phony $(UPDATE_TARGETS) -bts2ldap_fullindex: $(FORCE) - [ -L fullindex ] || ln -s $@ fullindex - $(WGET) http://qa.debian.org/data/bts2ldap/fullindex - ddpo_packages ddpo_maintainers: $(FORCE) $(WGET) http://qa.debian.org/data/ddpo/results/$@ @@ -56,6 +55,12 @@ clean-update:: $(RM) -f $(DATA_DIR)/debian-installer/binary-*/Packages.gz +bugs_unstable.txt: $(FORCE) + ssh -oBatchMode=yes $(SSH_UDD_ACCESS_HOST) "psql -Atx -c \"SELECT b.id, b.source, b.title, b.arrival, b.severity, b.affects_unstable, b.affects_stable, bmw.merged_with, bt.tag, but.tag AS usertag, but.email FROM bugs_rt_affects_unstable, bugs AS b FULL JOIN bugs_merged_with AS bmw ON b.id = bmw.id FULL JOIN bugs_tags AS bt ON b.id = bt.id FULL JOIN bugs_usertags AS but ON b.id = but.id WHERE (bugs_rt_affects_unstable.id = b.id) AND b.status <> 'done' AND (b.severity > 'important' OR (bt.tag = '$(subst ;,' OR bt.tag = ',$(TAGS))') OR (but.email = '$(subst ;,' OR but.email = ',$(USERTAGS_EMAILS))'));\" 'service=udd'" > $@ + +bugs_stable.txt: $(FORCE) + ssh -oBatchMode=yes $(SSH_UDD_ACCESS_HOST) "psql -Atx -c \"SELECT b.id, b.source, b.title, b.arrival, b.severity, b.affects_stable, b.affects_unstable, bmw.merged_with FROM bugs_rt_affects_stable, bugs AS b FULL JOIN bugs_merged_with AS bmw ON b.id = bmw.id WHERE (bugs_rt_affects_stable.id = b.id) AND b.status <> 'done' AND (b.severity > 'important');\" 'service=udd'" > $@ + clean: clean-update [ ! -d $(DATA_DIR) ] || { \ # remove broken symlinks: \ Modified: ddpo-by-mail/bugs.rb =================================================================== --- ddpo-by-mail/bugs.rb 2009-06-09 17:09:49 UTC (rev 1470) +++ ddpo-by-mail/bugs.rb 2009-06-09 21:02:24 UTC (rev 1471) @@ -1,99 +1,114 @@ require 'ddpo-config' +B_PACKAGE = "source" +B_TITLE = "title" +B_SEVERITY = "severity" +B_DATE = "arrival" +B_ASTABLE = "affects_stable" +B_AUNSTABLE = "affects_unstable" +B_TAGS = "tags" +B_UTAGS = "utags" +B_MERGED = "merged_with" + def parse_bugs # parse buglist bugs = {} + ppkgbugs = {} maxtime = Time::now.to_i - BUG_AGE * 86400 bugid = nil - bugsrcpkg = nil - bugpkg = nil - bugseverity = nil - bugtitle = nil - bugstate = nil - bugdone = false - bugdate = nil - bugtags = [] - bugaffect = [] - bugmerged = [] - bugrttags = [] + bugutag = nil + buguemail = nil - IO::read('data/bts2ldap_fullindex').each_line do |l| - l.chomp! - key, val = l.split(' ', 2) - if key == 'dn:' and bugid != nil - obugtags = bugtags - obugaffect = bugaffect - obugmerged = bugmerged - obugdone = bugdone - obugsrcpkg = bugsrcpkg - obugpkg = bugpkg - obugrttags = bugrttags + ['stable', 'unstable'].each do |release| + IO::read("data/bugs_#{release}.txt").each_line do |l| + l.chomp! + key, val = l.split('|', 2) + if key == 'id' + bugid = val.to_i + bugs[bugid] = {} if bugs[bugid].nil? + elsif [B_PACKAGE, B_TITLE, B_SEVERITY].include?(key) + bugs[bugid][key] = val + elsif key == 'tag' + bugs[bugid][B_TAGS] = {} if bugs[bugid][B_TAGS].nil? + if not val.empty? + bugs[bugid][B_TAGS][val] = 1 + end + elsif key == 'usertag' + bugutag = val + elsif key == 'email' + buguemail = val + if bugutag != nil + bugs[bugid][B_UTAGS] = {} if bugs[bugid][B_UTAGS].nil? + if not bugutag.empty? + bugs[bugid][B_UTAGS][bugutag] = 1 # << [ bugutag, buguemail ] + end + buguemail = nil + bugutag = nil + end + elsif key == B_MERGED + bugs[bugid][key] = [] if bugs[bugid][key].nil? + if not val.empty? and not bugs[bugid][key].include?(val.to_i) + bugs[bugid][key] << val.to_i + end + elsif key == B_DATE + bugs[bugid][key] = Date::parse(val) + elsif key == B_AUNSTABLE or key == B_ASTABLE + bugs[bugid][key] = false if bugs[bugid][key].nil? + # the affects_foo doesn't take tags into account + # but if the bug is listed in, e.g., the bugs_stable.txt file + # then it *does* affect stable. + s, bugrel = key.split('_', 2) + bugs[bugid][key] = true if release == bugrel and val == 't' + end + end + end - bugsrcpkg = nil - bugpkg = nil - bugdone = false - bugtags = [] - bugaffect = [] - bugmerged = [] - bugrttags = [] + processedbugs = {} + bugs.keys.each do |bugid| + # where we classify bugs. + if EXC_BUGS.include?(bugid) + puts "Skipping #{bugid}, it is excluded." + next + end - # where we classify bugs. - next if not obugmerged.empty? - next if not obugaffect.include?('unstable') - if EXC_BUGS.include?(bugid) - puts "Skipping #{bugid}, it is excluded." - next - end + pkg = bugs[bugid][B_PACKAGE] + processedbugs[pkg] = [] if processedbugs[pkg].nil? - reason = nil - if ['serious', 'grave', 'critical'].include?(bugseverity) - reason = "RC" - serious = bugdate < maxtime # serious issue if OLD bug - elsif not (obugrttags & RGTAGS.keys).empty? - reason = (obugrttags & RGTAGS.keys).map { |e| RGTAGS[e] }.join(', ') - serious = false # release goals are always non-serious - elsif not (obugrttags & ['qa:proposed-orphan','qa:proposed-removal']).empty? - reason = "PROP" - serious = true - end + # Skip bug if it is merged with another one we already processed + if not (processedbugs[pkg] & bugs[bugid][B_MERGED]).empty? + next + else + processedbugs[pkg] << bugid + end - next if reason.nil? + reason = nil + if ['serious', 'grave', 'critical'].include?(bugs[bugid][B_SEVERITY]) + reason = "RC" + serious = bugs[bugid][B_DATE] < maxtime # serious issue if OLD bug + elsif not (bugs[bugid][B_UTAGS].keys & RGTAGS.keys).empty? and bugs[bugid][B_AUNSTABLE] + reason = (bugs[bugid][B_UTAGS].keys & RGTAGS.keys).map { |e| RGTAGS[e] }.join(', ') + serious = false # release goals are always non-serious + elsif not (bugs[bugid][B_TAGS].keys & RGTAGS.keys).empty? and bugs[bugid][B_AUNSTABLE] + reason = (bugs[bugid][B_TAGS].keys & RGTAGS.keys).map { |e| RGTAGS[e] }.join(', ') + serious = false # release goals are always non-serious + elsif not (bugs[bugid][B_UTAGS].keys & ['proposed-orphan','proposed-removal']).empty? + reason = "PROP" + serious = true + end - if obugsrcpkg.nil? - obugsrcpkg = obugpkg - end - - bugs[obugsrcpkg] = [] if bugs[obugsrcpkg].nil? - bugs[obugsrcpkg] << [ bugid, serious, reason, bugtitle ] + next if reason.nil? - elsif key == 'debbugsID:' - bugid = val.to_i - elsif key== 'debbugsPackage:' - bugpkg = val - elsif key== 'debbugsSourcePackage:' - bugsrcpkg = val - elsif key == 'debbugsDone:' - bugdone = true - elsif key == 'debbugsSeverity:' - bugseverity = val - elsif key == 'debbugsTag:' - bugtags << val - elsif key == 'debbugsState:' - bugstate = val - elsif key == 'debbugsTitle:' - bugtitle = val - elsif key == 'debbugsAffected:' - bugaffect << val - elsif key == 'debbugsMergedWith:' - bugmerged << val - elsif key == 'debbugsDate:' - bugdate = val.to_i - elsif key == 'debbugsRTtag:' - bugrttags << val - end + ppkgbugs[pkg] = [] if ppkgbugs[pkg].nil? + ppkgbugs[pkg] << [ bugid, + serious, + reason, + bugs[bugid][B_TITLE], + bugs[bugid][B_ASTABLE], + bugs[bugid][B_AUNSTABLE] ] end - return bugs + + return ppkgbugs end if $0 == __FILE__ Modified: ddpo-by-mail/ddpo-config.rb =================================================================== --- ddpo-by-mail/ddpo-config.rb 2009-06-09 17:09:49 UTC (rev 1470) +++ ddpo-by-mail/ddpo-config.rb 2009-06-09 21:02:24 UTC (rev 1471) @@ -86,14 +86,18 @@ MAIL_DIR = "archives/" + d.year.to_s + d.month.to_s + d.day.to_s # Release Goals -# FIXME missing tags: ipv6 i18n-debconf lfs nfs-v4 goal-enriched-chroot ddtp dep-init ftbfs-gcc +# FIXME missing tags: i18n-debconf goal-enriched-chroot dep-init ftbfs-gcc RGTAGS = { 'goal-dash' => 'switch /bin/sh to dash', - 'qa:qa-doublebuild' => 'double compilation support', + 'qa-doublebuild' => 'double compilation support', 'goal-recommends' => 'no unmet recommends', 'debmake' => 'drop debmake from Debian', 'utf8-control' => 'UTF-8 changelog and control', 'piuparts-stable-upgrade' => 'piuparts-clean archive', 'goal-python2.5' => 'python2.5 support', - 'gfortran' => 'g77 -> gfortran transition' + 'gfortran' => 'g77 -> gfortran transition', + 'lfs' => 'Remove arbitrary file size limits', + 'ipv6' => 'IPv6 support', + 'nfs-v4' => 'Support version 4 of the NFS protocol', + 'ddtp' => 'I18n support for package descriptions' } Modified: ddpo-by-mail/reminder-mail.rb =================================================================== --- ddpo-by-mail/reminder-mail.rb 2009-06-09 17:09:49 UTC (rev 1470) +++ ddpo-by-mail/reminder-mail.rb 2009-06-09 21:02:24 UTC (rev 1471) @@ -233,11 +233,14 @@ bugs = iss[1].reject { |b| EXC_EMAILS_BUGS[email].include?(b[0]) } next if bugs.length == 0 text[pkg][T_INCLUDE] = true - text[pkg][T_BUGS] = "= #{bugs.length} bug(s) that should be fixed for the next Debian release:\n" + text[pkg][T_BUGS] = "= #{bugs.length} bug(s) that should be fixed soon:\n" bugs.each do |b| text[pkg][T_BUGS] += "- ##{b[0]} <http://bugs.debian.org/#{b[0]}>\n" text[pkg][T_BUGS] += " #{b[3]}\n" if b[2] == "RC" + if b[4] + text[pkg][T_BUGS] += " You should fix it for the next stable point release[1]\n" + end # add nothing elsif b[2] == "PROP" # add nothing @@ -315,7 +318,7 @@ ------------ interesting stuff probably ends here ------------ This is an automated mail. These mails are sent twice a month. For more information about these mails, refer to -http://wiki.debian.org/qa.debian.org/DdpoByMail +[1]http://wiki.debian.org/qa.debian.org/DdpoByMail We are sorry if this mail was useless for you. If you think it was avoidable (that we can detect easily that the problems weren't _______________________________________________ Collab-qa-commits mailing list Collab-qa-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/collab-qa-commits