libspec.lib: fix initialization of SPEC_SOURCE0 and SPEC_SOURCE0_VERBATIM

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2013-01-06 23:24:56 +01:00
parent 26f2b6a93d
commit 2e20dab6ef
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,12 @@
Changes in version 1.16.3 - Christmas Release
--- Jan -- 2013 Madrisan <davide.madrisan(a)gmail.com>
+ bugfix
* libspec.lib - Davide Madrisan:
Fix initialization of SPEC_SOURCE0 and SPEC_SOURCE0_VERBATIM".
-------------------------------------------------------------------------------
Changes in version 1.16.2 - Christmas Release
Tue Dec 18 2012 Madrisan <davide.madrisan(a)gmail.com>

View File

@ -891,7 +891,8 @@ rpmvars.solve "${SPEC_PATCH[$i]}" "$specfile" | \
[ "$SPEC_SOURCE0_VERBATIM" ] ||
{ SPEC_SOURCE0_VERBATIM=$(\
sed -n "/%description/q;{
/^[ \t]*Source[0]*/{s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" \
/^[ \t]*\(Source\|Source0\)[ \t]*:/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" \
$specfile)
notify.debug "\
$FUNCNAME: SPEC_SOURCE0_VERBATIM = \"$SPEC_SOURCE0_VERBATIM\""
@ -900,10 +901,10 @@ $FUNCNAME: SPEC_SOURCE0_VERBATIM = \"$SPEC_SOURCE0_VERBATIM\""
fi
[ "$SPEC_SOURCE0" ] && continue
SPEC_SOURCE0=$(sed -n "/%description/q;{
/^[ \t]*Source[0]*/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,
p}}" $specfile)
/^[ \t]*\(Source\|Source0\)[ \t]*:/{
s,[ \t]*Source[0]*[ \t]*:[ \t]*,,p}}" $specfile)
SPEC_SOURCE0=$(rpmvars.solve "$SPEC_SOURCE0" "$specfile")
notify.debug "$FUNCNAME: $var = \"$SPEC_SOURCE0\""
;;