]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- 1.602: py_lint: fail if no files processed (invalid find pipe) auto/ac/rpm-build-macros-1_602-1 auto/th/rpm-build-macros-1_602-1
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 31 Jan 2011 15:49:10 +0000 (15:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-build-macros.spec -> 1.287
    rpm.macros -> 1.602

rpm-build-macros.spec
rpm.macros

index 7dd2b60fe56283c8943f5dbe46844d837403a689..f58002af1db6ae3a1e51d28ef96c00b557ee19ca 100644 (file)
@@ -1,10 +1,10 @@
-%define                rpm_macros_rev  1.601
+%define                rpm_macros_rev  1.602
 %define                find_lang_rev   1.34
 Summary:       PLD Linux RPM build macros
 Summary(pl.UTF-8):     Makra do budowania pakietów RPM dla Linuksa PLD
 Name:          rpm-build-macros
 Version:       %{rpm_macros_rev}
-Release:       2
+Release:       1
 License:       GPL
 Group:         Development/Building
 Source0:       rpm.macros
index a52fcbb5cbc5829af64cf6222adc3691677e09a3..2b63d6ae14a3f408e89cba533236340f46bce124 100644 (file)
@@ -1867,7 +1867,7 @@ find "$@" -type f -name '*.py' | python -c ' \
 import sys \
 import compiler \
 \
-err = 0\
+found = err = 0\
 for f in sys.stdin: \
        fd = open(f.strip()) \
        c = fd.read() \
@@ -1878,7 +1878,10 @@ for f in sys.stdin: \
                print "py_lint: %s: %s" % (f.strip(), e) \
                err = err + 1\
 \
-if err: \
+if not found:\
+       print >> sys.stderr, "\\npy_lint: ERROR: No files processed.\\n" \
+       sys.exit(1) \
+elif err: \
        print >> sys.stderr, "\\npy_lint: ERROR: Syntax errors in %d files.\\n" % err \
        sys.exit(1) \
 else: \
This page took 0.046096 seconds and 4 git commands to generate.