1 |
commit: ed362d1d47dd71a7deb1610cd1178305522339ac |
2 |
Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 18:46:56 2011 +0000 |
4 |
Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 18:46:56 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/arch-tools.git;a=commit;h=ed362d1d |
7 |
|
8 |
Really only consider latest version in ~arch. |
9 |
|
10 |
--- |
11 |
stabilization-candidates.py | 22 +++++++++++----------- |
12 |
1 files changed, 11 insertions(+), 11 deletions(-) |
13 |
|
14 |
diff --git a/stabilization-candidates.py b/stabilization-candidates.py |
15 |
index 8feee30..d2e539c 100755 |
16 |
--- a/stabilization-candidates.py |
17 |
+++ b/stabilization-candidates.py |
18 |
@@ -80,16 +80,6 @@ if __name__ == "__main__": |
19 |
if getmaskingstatus(cpv) not in [[u'~%s keyword' % arch] for arch in options.arch]: |
20 |
continue |
21 |
|
22 |
- pv = portage.versions.catsplit(cpv)[1] |
23 |
- with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file: |
24 |
- regex = '\*%s \((.*)\)' % re.escape(pv) |
25 |
- match = re.search(regex, changelog_file.read()) |
26 |
- if not match: |
27 |
- continue |
28 |
- changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') |
29 |
- if now - changelog_date < datetime.timedelta(days=options.days): |
30 |
- continue |
31 |
- |
32 |
candidates.append(cpv) |
33 |
if not candidates: |
34 |
continue |
35 |
@@ -97,11 +87,21 @@ if __name__ == "__main__": |
36 |
candidates.sort(key=portage.versions.cpv_sort_key()) |
37 |
candidates.reverse() |
38 |
|
39 |
- # Only consider the best version in ~arch for stabilization. |
40 |
+ # Only consider the best version for stabilization. |
41 |
# It's usually better tested, and often maintainers refuse |
42 |
# to stabilize anything else, e.g. bug #391607. |
43 |
best_candidate = candidates[0] |
44 |
|
45 |
+ pv = portage.versions.catsplit(best_candidate)[1] |
46 |
+ with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file: |
47 |
+ regex = '\*%s \((.*)\)' % re.escape(pv) |
48 |
+ match = re.search(regex, changelog_file.read()) |
49 |
+ if not match: |
50 |
+ continue |
51 |
+ changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y') |
52 |
+ if now - changelog_date < datetime.timedelta(days=options.days): |
53 |
+ continue |
54 |
+ |
55 |
cvs_path = os.path.join(options.repo, cp) |
56 |
ebuild_name = portage.versions.catsplit(best_candidate)[1] + ".ebuild" |
57 |
ebuild_path = os.path.join(cvs_path, ebuild_name) |