libspec: the previous fix was not correct

This commit is contained in:
Silvan Calarco 2011-09-24 18:53:50 +02:00
parent fa9b236d17
commit ea971add94

View File

@ -565,8 +565,8 @@ $FUNCNAME: * blank unexpanded and undefined variables beginning by \`?'..."
case "$output" in *%*) case "$output" in *%*)
notify.debug "$FUNCNAME: * expanding rpm variables, if any..." notify.debug "$FUNCNAME: * expanding rpm variables, if any..."
# hack to prevent a rpm segfault when evaluating urls containing '%' (e.g. python-pyslsk) # hack to prevent a rpm segfault when evaluating urls containing '%' (e.g. python-pyslsk)
output_prefix=`echo ${output} | sed "s|\(^[a-z]://\)|\1|"` output_prefix=`echo ${output} | sed "s|\(^[a-z]*://\).*|\1|"`
output_suffix=${output/$output_prefix} output_suffix=`echo ${output} | sed "s|$output_prefix||"`
notify.debug "$FUNCNAME: rpm --eval \"${output_suffix}\"" notify.debug "$FUNCNAME: rpm --eval \"${output_suffix}\""
output=$(rpm --eval "${output_suffix}") output=$(rpm --eval "${output_suffix}")
output="${output_prefix}${output}" output="${output_prefix}${output}"