1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#!/usr/bin/python
# template for finding builds that meet some time/buildroot component critera.
# Edit to suit.
import koji
import datetime
## releng folks, update the blacklist below for packages that the maintainer
## wishes to opt-out of autorebuilding.
blacklist = ['thunderbird','banshee','epiphany','epiphany-extensions','libipoddevice','malaga-suomi-voikko','bless','sysvinit','mecab-ipadic','mecab-jumandic','kazehakase']
kojisession = koji.ClientSession('http://koji.fedoraproject.org/kojihub')
tocheck = []
needbuild = []
reallyneedbuild = []
ownermap = {}
print datetime.datetime.isoformat(datetime.datetime.utcnow())
f9builds = kojisession.listTagged('dist-f9', inherit=True, latest=True)
pkgs = kojisession.listPackages('dist-f9', inherited=True)
for pkg in pkgs:
ownermap[pkg['package_name']] = pkg['owner_name']
for build in f9builds:
if build['creation_time'] < '2008-01-30 15:22:10.000000':
tocheck.append(build)
checknum = len(tocheck)
for build in tocheck:
if build['name'] in blacklist:
continue
print "Checking %s (%s of %s)" % (build['nvr'], tocheck.index(build)+1, checknum)
if not build['task_id']:
rpms = kojisession.listRPMs(buildID=build['build_id'])
for rpm in rpms:
if rpm['arch'] != 'src' and rpm['arch'] != 'noarch':
needbuild.append(build)
continue
continue
for task in kojisession.getTaskChildren(build['task_id']):
if build in needbuild:
continue
if task['method'] == 'buildArch':
if task['arch'] == 'noarch':
print "noarch build, skipping task", task['id']
continue
for rootid in kojisession.listBuildroots(taskID=task['id']):
for pkg in kojisession.listRPMs(componentBuildrootID=rootid['id']):
if pkg['name'] == 'gcc':
if pkg['version'] < '4.3.0':
if not build in needbuild:
print "adding", build['name']
needbuild.append(build)
continue
continue
rebuildnames = []
for build in needbuild:
if not build in reallyneedbuild:
reallyneedbuild.append(build)
rebuildnames.append("%s %s" % (ownermap[build['name']], build['name']))
rebuildnames.sort()
for build in rebuildnames:
print build
|