libspec.lib: better separation of the autospec and rpm output when reporting a syntax error of a specfile
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
3c4d5b7880
commit
45b271e4c9
@ -16,6 +16,13 @@ Changes in version 1.16.2
|
|||||||
* lib/libmsgmng.lib - Davide Madrisan:
|
* lib/libmsgmng.lib - Davide Madrisan:
|
||||||
Translate "ERROR", "WARNING", and "DEBUG".
|
Translate "ERROR", "WARNING", and "DEBUG".
|
||||||
|
|
||||||
|
* lib/libspec.lib - Davide Madrisan:
|
||||||
|
Better error reporting in case of syntax errors in the specfiles.
|
||||||
|
|
||||||
|
+ update
|
||||||
|
* po/it/autospec.po - Davide Madrisan:
|
||||||
|
Update the tranlation file.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.16.1
|
Changes in version 1.16.1
|
||||||
|
@ -645,15 +645,16 @@ rpm -q $rpm_options --specfile --specedit $specfile \
|
|||||||
> $specfile_preprocessed 2> $tmpspreprerr"
|
> $specfile_preprocessed 2> $tmpspreprerr"
|
||||||
|
|
||||||
if [ -s "$tmpspreprerr" ]; then
|
if [ -s "$tmpspreprerr" ]; then
|
||||||
notify.warning $"the specfile has some syntax errors:"
|
notify.warning $"\
|
||||||
|
the specfile has some syntax errors"" ("$"rpm output""):"
|
||||||
while read line; do
|
while read line; do
|
||||||
notify.warning " $line"
|
echo " $line"
|
||||||
done < $tmpspreprerr
|
done < $tmpspreprerr
|
||||||
elif [ -z "$(grep "^%changelog" $specfile_preprocessed 2>/dev/null)" ]; then
|
elif [ -z "$(grep "^%changelog" $specfile_preprocessed 2>/dev/null)" ]; then
|
||||||
# try to catch some other syntax errors even if rpm exit with
|
# try to catch some other syntax errors even if rpm exit with
|
||||||
# a zero return code and no messages are sent to stderr
|
# a zero return code and no messages are sent to stderr
|
||||||
# FIXME: we assume "%changelog" is the last part of the specfile
|
# FIXME: we assume "%changelog" is the last part of the specfile
|
||||||
notify.warning $"the specfile has some syntax errors:"
|
notify.warning $"the specfile has some syntax errors"":"
|
||||||
while read line; do
|
while read line; do
|
||||||
notify.warning " $line"
|
notify.warning " $line"
|
||||||
done < <(tail -n 3 $specfile_preprocessed)
|
done < <(tail -n 3 $specfile_preprocessed)
|
||||||
|
@ -550,8 +550,11 @@ msgstr "specfile con fine linea CR"
|
|||||||
msgid "specfile with an unsupported format"
|
msgid "specfile with an unsupported format"
|
||||||
msgstr "specfile in formato non supportato"
|
msgstr "specfile in formato non supportato"
|
||||||
|
|
||||||
msgid "the specfile has some syntax errors:"
|
msgid "the specfile has some syntax errors"
|
||||||
msgstr "lo specfile ha degli errori di sintassi:"
|
msgstr "lo specfile ha degli errori di sintassi"
|
||||||
|
|
||||||
|
msgid "rpm output"
|
||||||
|
msgstr "output rpm"
|
||||||
|
|
||||||
msgid "the error should be here!"
|
msgid "the error should be here!"
|
||||||
msgstr "l'errore dovrebbe essere qui!"
|
msgstr "l'errore dovrebbe essere qui!"
|
||||||
|
Loading…
Reference in New Issue
Block a user