summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstabilization-candidates.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/stabilization-candidates.py b/stabilization-candidates.py
index 8feee30..d2e539c 100755
--- a/stabilization-candidates.py
+++ b/stabilization-candidates.py
@@ -80,16 +80,6 @@ if __name__ == "__main__":
if getmaskingstatus(cpv) not in [[u'~%s keyword' % arch] for arch in options.arch]:
continue
- pv = portage.versions.catsplit(cpv)[1]
- with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file:
- regex = '\*%s \((.*)\)' % re.escape(pv)
- match = re.search(regex, changelog_file.read())
- if not match:
- continue
- changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y')
- if now - changelog_date < datetime.timedelta(days=options.days):
- continue
-
candidates.append(cpv)
if not candidates:
continue
@@ -97,11 +87,21 @@ if __name__ == "__main__":
candidates.sort(key=portage.versions.cpv_sort_key())
candidates.reverse()
- # Only consider the best version in ~arch for stabilization.
+ # Only consider the best version for stabilization.
# It's usually better tested, and often maintainers refuse
# to stabilize anything else, e.g. bug #391607.
best_candidate = candidates[0]
+ pv = portage.versions.catsplit(best_candidate)[1]
+ with open(os.path.join(options.repo, cp, 'ChangeLog')) as changelog_file:
+ regex = '\*%s \((.*)\)' % re.escape(pv)
+ match = re.search(regex, changelog_file.read())
+ if not match:
+ continue
+ changelog_date = datetime.datetime.strptime(match.group(1), '%d %b %Y')
+ if now - changelog_date < datetime.timedelta(days=options.days):
+ continue
+
cvs_path = os.path.join(options.repo, cp)
ebuild_name = portage.versions.catsplit(best_candidate)[1] + ".ebuild"
ebuild_path = os.path.join(cvs_path, ebuild_name)