From 2e20dab6efa972c11e6d668e943d1865528c12fd Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sun, 6 Jan 2013 23:24:56 +0100 Subject: [PATCH] libspec.lib: fix initialization of SPEC_SOURCE0 and SPEC_SOURCE0_VERBATIM Signed-off-by: Davide Madrisan --- ChangeLog | 9 +++++++++ lib/libspec.lib.in | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c957bfe..ed471a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Changes in version 1.16.3 - Christmas Release +--- Jan -- 2013 Madrisan + ++ 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 diff --git a/lib/libspec.lib.in b/lib/libspec.lib.in index b0da1c1..0a18cd6 100644 --- a/lib/libspec.lib.in +++ b/lib/libspec.lib.in @@ -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\"" ;;