12 return re.match(r"(.+)-[^-]+-[^-]+", nvr).group(1)
17 def sendfile(src, dst):
26 def append_to(log, msg):
33 os.system("rm -f %s/* 2>/dev/null; rmdir %s 2>/dev/null" % (dir, dir))
36 f = os.popen("uuidgen 2>&1")
37 u = string.strip(f.read())
40 raise "uuid: fatal, cannot generate uuid: %s" % u
47 exctype, value = sys.exc_info()[:2]
48 if exctype == SystemExit:
50 s = StringIO.StringIO()
51 traceback.print_exc(file = s, limit = 20)
52 log.alert("fatal python exception during: %s" % status.get())
53 log.alert(s.getvalue())
56 def collect_files(log):
58 rx = re.compile(r"^Wrote: (/home.*\.rpm)$")
60 for l in f.xreadlines():
63 files.append(m.group(1))