diff options
author | 2012-04-08 20:59:08 +0200 | |
---|---|---|
committer | 2012-04-08 20:59:25 +0200 | |
commit | c94896ce582870cf1188ce8e171349aa29546de7 (patch) | |
tree | 5c40cf90e168d5c88144ad176acbbddcbaba68ec | |
parent | Check if overlay directory exists (diff) | |
download | overlint-c94896ce582870cf1188ce8e171349aa29546de7.tar.gz overlint-c94896ce582870cf1188ce8e171349aa29546de7.tar.bz2 overlint-c94896ce582870cf1188ce8e171349aa29546de7.zip |
-rw-r--r-- | overlint/cli.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/overlint/cli.py b/overlint/cli.py index 1a42c17..7ad967d 100644 --- a/overlint/cli.py +++ b/overlint/cli.py @@ -3,7 +3,7 @@ from __future__ import print_function -VERSION_STR = '0.4.2' +VERSION_STR = '0.5' import sys import os @@ -73,6 +73,23 @@ def find_missed_bumps(gentoo_versions, overlay_versions): missed_version_bumps.append(ov) return (missed_revision_bumps, missed_version_bumps) + +def find_lagging_behind_gentoo(gentoo_versions, overlay_versions): + lagging_behind_gentoo = list() + for ov in overlay_versions: + if '999' in ov: + continue + for gv in gentoo_versions: + if '999' in gv: + continue + if ov == gv: + continue + if portage.vercmp(ov, gv) < 0 and ov not in gentoo_versions: + lagging_behind_gentoo.append(ov) + break + return lagging_behind_gentoo + + def find_ebuild_changes(category_package, overlay_path, gentoo_versions, overlay_versions): ebuild_changes = list() intersection = set(gentoo_versions) & set(overlay_versions) @@ -139,6 +156,7 @@ def main(args): missed_revision_bumps_tree = dict() missed_version_bumps_tree = dict() ebuild_changes_tree = dict() + lagging_behind_gentoo__tree = dict() for root, dirs, files in os.walk(conf.overlay_path): if '.svn' in dirs: @@ -158,6 +176,7 @@ def main(args): overlay_versions = find_atoms(conf.overlay_path, category_package) gentoo_versions = find_atoms('/usr/portage/', category_package) (missed_revision_bumps, missed_version_bumps) = find_missed_bumps(gentoo_versions, overlay_versions) + lagging_behind_gentoo = find_lagging_behind_gentoo(gentoo_versions, overlay_versions) ebuild_changes = find_ebuild_changes(category_package, conf.overlay_path, gentoo_versions, overlay_versions) category, package = category_package.split('/') if missed_revision_bumps: @@ -166,9 +185,13 @@ def main(args): missed_version_bumps_tree.setdefault(category, dict())[package] = highest_revision_only(missed_version_bumps) if ebuild_changes: ebuild_changes_tree.setdefault(category, dict())[package] = ebuild_changes + if lagging_behind_gentoo: + lagging_behind_gentoo__tree.setdefault(category, dict())[package] = lagging_behind_gentoo + dump_tree(missed_version_bumps_tree, 'Version bumps missing from Gentoo main tree') dump_tree(missed_revision_bumps_tree, 'Revision bumps missing from Gentoo main tree') + dump_tree(lagging_behind_gentoo__tree, 'Ebuilds lagging behind the Gentoo main tree') dump_tree(ebuild_changes_tree, 'Ebuilds that differ at same revision') return 0 |