diff options
author | 2012-05-19 01:10:26 +0200 | |
---|---|---|
committer | 2012-05-19 01:10:26 +0200 | |
commit | 119bc8d9d4c7e21462bbfddbf081c2d2e6275003 (patch) | |
tree | efa67b6515a095766e7bbc7abb8c5730b628481e | |
parent | Report ebuilds lagging behind main tree, requested by non7top (diff) | |
download | overlint-119bc8d9d4c7e21462bbfddbf081c2d2e6275003.tar.gz overlint-119bc8d9d4c7e21462bbfddbf081c2d2e6275003.tar.bz2 overlint-119bc8d9d4c7e21462bbfddbf081c2d2e6275003.zip |
Use PORTDIR
-rw-r--r-- | overlint/cli.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/overlint/cli.py b/overlint/cli.py index 7ad967d..6c91a59 100644 --- a/overlint/cli.py +++ b/overlint/cli.py @@ -20,6 +20,7 @@ except ImportError: _revision_matcher = re.compile('-r([0-9]+)$') +portdir = portage.settings["PORTDIR"] def find_atoms(repository_path, category_package): versions = list() @@ -99,9 +100,9 @@ def find_ebuild_changes(category_package, overlay_path, gentoo_versions, overlay for version in intersection: ebuild_name = '%s-%s.ebuild' % (package, version) command = """bash -c 'FILTER() { sed -e "/# $Header/d" -e "/# Copyright/d" -e "/KEYWORDS=/d" "$@"; }; """ \ - """cmp --quiet <(FILTER /usr/portage/%s/%s) <(FILTER %s/%s/%s) ; """ \ + """cmp --quiet <(FILTER %s/%s/%s) <(FILTER %s/%s/%s) ; """ \ """exit $?'""" \ - % (category_package, ebuild_name, overlay_path, category_package, ebuild_name) + % (portdir, category_package, ebuild_name, overlay_path, category_package, ebuild_name) ret = os.system(command) if not ret: continue @@ -168,13 +169,13 @@ def main(args): category_package = full_path_overlay[len(conf.overlay_path + '/'):] if len(category_package.split('/')) != 2: continue - full_path_gentoo = os.path.join('/usr/portage/', category_package) + full_path_gentoo = os.path.join(portdir, category_package) found = os.path.exists(full_path_gentoo) if not found: continue overlay_versions = find_atoms(conf.overlay_path, category_package) - gentoo_versions = find_atoms('/usr/portage/', category_package) + gentoo_versions = find_atoms(portdir, 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) |