extfs: rpm: wrap variable in quotes.

Our goal is to replace the 'echo' with 'printf' on this line, for the reason
described in the previous commit. But before we do this we need to wrap one
variable in quotes.

This preliminary step does not affect the output of the helper.

As for using "tr \n ' '": this mimics the current behavior (when using no
quotes around the variable, newlines are converted to spaces by the shell; now
that we do have quotes we need to do this conversion ourselves). An alternative
is to tweak the sed script to be smarter, but it turns out it's not a simple
task.

Signed-off-by: Mooffie <mooffie@gmail.com>
This commit is contained in:
Mooffie 2017-03-06 19:16:24 +02:00
parent 95f2f14357
commit 25aa5db3fd

View File

@ -111,7 +111,8 @@ mcrpmfs_getAllNeededTags()
"|PROVIDES=%{PROVIDES} %{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}"\
${tag_CONFLICTS}\
"|PACKAGER=%{PACKAGER}" \
"${rpm_filename}"
"${rpm_filename}" \
| tr '\n' ' ' # The newlines in DESCRIPTION mess with the sed script in mcrpmfs_getOneTag().
}
mcrpmfs_getRawOneTag()
@ -121,7 +122,7 @@ mcrpmfs_getRawOneTag()
mcrpmfs_getOneTag()
{
echo $AllTAGS | $SED "s/.*|${1}=//" | cut -d '|' -f 1
echo "$AllTAGS" | $SED "s/.*|${1}=//" | cut -d '|' -f 1
}
mcrpmfs_printOneMetaInfo()