pck-update: Display the error detected by the command "rpm -q --specfile --specedit" when a specfile contains errors
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
e8bd1780dc
commit
e0ad10cbdf
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Changes in version 1.9.1
|
||||||
|
--- --- -- 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||||
|
|
||||||
|
+ improvement
|
||||||
|
* pck-update - Davide Madrisan:
|
||||||
|
Display the error detected by the command 'rpm -q --specfile --specedit'
|
||||||
|
when a specfile contains errors.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.9.0 - Silvan Birthday Release
|
Changes in version 1.9.0 - Silvan Birthday Release
|
||||||
Sun Jan 15 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
Sun Jan 15 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||||
|
|
||||||
|
@ -439,12 +439,20 @@ done)"
|
|||||||
|
|
||||||
# create the specfile_preprocessed only once
|
# create the specfile_preprocessed only once
|
||||||
if [ ! -s "$specfile_preprocessed" ]; then
|
if [ ! -s "$specfile_preprocessed" ]; then
|
||||||
|
local tmpspreprerr=$(mktemp -q -t $me.XXXXXXXX)
|
||||||
|
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
||||||
|
notify.debug "tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
|
||||||
|
|
||||||
notify.debug "running: \
|
notify.debug "running: \
|
||||||
rpm -q $USER_RPMDEFINE_OPTS --specfile --specedit $SRPM_SPECFILE_WITH_PATH ..."
|
rpm -q $USER_RPMDEFINE_OPTS --specfile --specedit $SRPM_SPECFILE_WITH_PATH ..."
|
||||||
|
|
||||||
eval "\
|
eval "\
|
||||||
rpm -q $USER_RPMDEFINE_OPTS --specfile --specedit $SRPM_SPECFILE_WITH_PATH \
|
rpm -q $USER_RPMDEFINE_OPTS --specfile --specedit $SRPM_SPECFILE_WITH_PATH \
|
||||||
2>/dev/null >> $specfile_preprocessed" ||
|
2> $tmpspreprerr >> $specfile_preprocessed"
|
||||||
notify.error $"rpm exited with error code \`$?'"
|
[ -s "$tmpspreprerr" ] &&
|
||||||
|
{ notify.error $"specfile has errors:""\n$(\
|
||||||
|
while read line; do echo " $line"; done < $tmpspreprerr)"; }
|
||||||
|
rm -f $tmpspreprerr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SPECFILE_PREPROCESSED="$specfile_preprocessed"
|
SPECFILE_PREPROCESSED="$specfile_preprocessed"
|
||||||
|
Loading…
Reference in New Issue
Block a user