libspec: 'rpm -q --specfile --specedit <specfile>' does not always exit with an error code when the specfiles have syntax errors. Try to catch these problems.
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
58edaf3373
commit
ee9a2c72b2
@ -6,6 +6,13 @@ Changes in version 1.16.2
|
|||||||
New function 'specfile.check_syntax()' based on the code previously
|
New function 'specfile.check_syntax()' based on the code previously
|
||||||
located in the module pck-update (function 'infofile.create()').
|
located in the module pck-update (function 'infofile.create()').
|
||||||
|
|
||||||
|
+ improvement
|
||||||
|
* lib/libspec.lib - Davide Madrisan:
|
||||||
|
'rpm -q --specfile --specedit <specfile>' 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
|
Changes in version 1.16.1
|
||||||
|
@ -644,7 +644,9 @@ $FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..."
|
|||||||
rpm -q $rpm_options --specfile --specedit $specfile \
|
rpm -q $rpm_options --specfile --specedit $specfile \
|
||||||
> $specfile_preprocessed 2> $tmpspreprerr"
|
> $specfile_preprocessed 2> $tmpspreprerr"
|
||||||
|
|
||||||
[ -s "$tmpspreprerr" ] &&
|
[[ -s "$tmpspreprerr" ||
|
||||||
|
$(cat $specfile_preprocessed | wc -l) -lt \
|
||||||
|
$(cat $specfile | wc -l) ]] &&
|
||||||
{ notify.warning $"specfile has errors:"
|
{ notify.warning $"specfile has errors:"
|
||||||
while read line; do
|
while read line; do
|
||||||
notify.warning " $line"
|
notify.warning " $line"
|
||||||
|
Loading…
Reference in New Issue
Block a user