diff --git a/ChangeLog b/ChangeLog index 675923a..e19937c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,13 @@ Changes in version 1.16.2 New function 'specfile.check_syntax()' based on the code previously located in the module pck-update (function 'infofile.create()'). ++ improvement + * lib/libspec.lib - Davide Madrisan: + 'rpm -q --specfile --specedit ' does not always exit with an + error code when the specfiles have syntax errors. + Try to catch these problems too. + (This problem has been pointed out by Silvan Calarco). + ------------------------------------------------------------------------------- Changes in version 1.16.1 diff --git a/lib/libspec.lib.in b/lib/libspec.lib.in index 16e913e..0d7358a 100644 --- a/lib/libspec.lib.in +++ b/lib/libspec.lib.in @@ -644,7 +644,9 @@ $FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..." rpm -q $rpm_options --specfile --specedit $specfile \ > $specfile_preprocessed 2> $tmpspreprerr" - [ -s "$tmpspreprerr" ] && + [[ -s "$tmpspreprerr" || + $(cat $specfile_preprocessed | wc -l) -lt \ + $(cat $specfile | wc -l) ]] && { notify.warning $"specfile has errors:" while read line; do notify.warning " $line"