summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2012-04-07 00:24:48 +0200
committerSebastian Pipping <sebastian@pipping.org>2012-04-07 00:25:27 +0200
commit5b8354a9ae9db7700663e4ea4c987628fbfc5255 (patch)
tree5e15cf43c7fe099773f7ced932055317d5826b2f
parentRequire overlay location parameter (using argparse) (diff)
downloadoverlint-5b8354a9ae9db7700663e4ea4c987628fbfc5255.tar.gz
overlint-5b8354a9ae9db7700663e4ea4c987628fbfc5255.tar.bz2
overlint-5b8354a9ae9db7700663e4ea4c987628fbfc5255.zip
No longer count CVS metadata or copyright years as changesv0.3
-rw-r--r--overlint/cli.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/overlint/cli.py b/overlint/cli.py
index 10a3ef7..a0720b2 100644
--- a/overlint/cli.py
+++ b/overlint/cli.py
@@ -3,7 +3,7 @@
from __future__ import print_function
-VERSION_STR = '0.2'
+VERSION_STR = '0.3'
import sys
import os
@@ -80,7 +80,10 @@ def find_ebuild_changes(category_package, overlay_path, gentoo_versions, overlay
category, package = category_package.split('/')
for version in intersection:
ebuild_name = '%s-%s.ebuild' % (package, version)
- command = "bash -c 'cmp --quiet <(fgrep -v KEYWORDS= /usr/portage/%s/%s) <(fgrep -v KEYWORDS= %s/%s/%s) ; exit $?'" % (category_package, ebuild_name, overlay_path, category_package, ebuild_name)
+ 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) ; """ \
+ """exit $?'""" \
+ % (category_package, ebuild_name, overlay_path, category_package, ebuild_name)
ret = os.system(command)
if not ret:
continue