summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlint/cli.py9
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)