=== removed file '.bzrignore' --- .bzrignore 2012-01-18 00:23:46 +0000 +++ .bzrignore 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -targets === removed file 'scripts/elogread.py' --- scripts/elogread.py 2012-01-18 00:23:46 +0000 +++ scripts/elogread.py 1970-01-01 00:00:00 +0000 @@ -1,65 +0,0 @@ -#!/usr/bin/env python -# vim: tw=75 sts=4 ts=4 noet fileencoding=utf-8 -import re -import argparse -from collections import namedtuple, deque - -RE_PACKAGE = re.compile( - r"^>>> Messages generated by process (\d+) on (.+) for package ([^:]+):" - ) -Package = namedtuple('Package', 'pid date package messages') - -RE_MESSAGE = re.compile(r"^(INFO|LOG|WARN|ERROR): ([a-z]+)$") -Message = namedtuple('Message', 'cls phase lines') - -class ElogSummaryParser(object): - def __init__(self, f=None): - self.packages = deque() - if f is not None: - self.parse_file(f) - - def parse_line(self, line): - m = RE_PACKAGE.match(line) - if m: - self.packages.append(Package(*( - m.groups() + (deque(),) - ))) - return - - m = RE_MESSAGE.match(line) - if m: - self.packages[-1].messages.append(Message(*( - m.groups() + (deque(),) - ))) - return - - if not self.packages[-1].messages and not line.strip(): - return - - self.packages[-1].messages[-1].lines.append(line) - - def parse_file(self, f): - if not hasattr(f, 'read'): - f = open(f) - for line in f: - self.parse_line(line.rstrip('\n')) - -parser = argparse.ArgumentParser() -parser.add_argument('action', choices=[ - 'errors' - ]) -parser.add_argument('logfile', type=argparse.FileType('r'), - help='summary.log file') - -def main(): - args = parser.parse_args() - packages = ElogSummaryParser(args.logfile).packages - if args.action == 'errors': - for pkg in packages: - if any(( True for msg in pkg.messages if msg.cls == 'ERROR' )): - print pkg.package - else: - print "unknown action %r"%args.action - -if __name__ == '__main__': - main() === removed file 'scripts/functions' --- scripts/functions 2012-01-18 00:23:46 +0000 +++ scripts/functions 1970-01-01 00:00:00 +0000 @@ -1,7 +0,0 @@ -# vim: noet ts=4 sts=4 ft=zsh -die() { - echo DIE: "$@" - exit 1 -} - - === removed file 'scripts/mask_failed_packages' --- scripts/mask_failed_packages 2012-01-18 00:23:46 +0000 +++ scripts/mask_failed_packages 1970-01-01 00:00:00 +0000 @@ -1,15 +0,0 @@ -#!/bin/zsh -source ${0:h}/functions - -[[ -d $1 ]] || die usage: ${0:t} '' -set -x -mask=$1/etc/portage/package.mask -[[ -d $mask ]] && mask=$mask/failed -for pkg in ${(f)$( \ - ${0:h}/elogread.py errors $1/var/log/portage/elog/summary.log )} -do - if ! [[ -d $1/var/db/pkg/$pkg ]] - then - atom="=$pkg" - grep -qFwe $atom $mask || echo $atom >> $mask -done