From 89e4b701b24896c92e15749538a2771decade19042f0e57b061983fa1828fde0 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 14 Nov 2014 08:31:26 +0000 Subject: [PATCH] Accepting request 261214 from home:Andreas_Schwab:Factory - Use $(...) instead of `...` to avoid losing backslash quoting OBS-URL: https://build.opensuse.org/request/show/261214 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build-compare?expand=0&rev=152 --- build-compare.changes | 5 +++++ functions.sh | 4 ++-- same-build-result.sh | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build-compare.changes b/build-compare.changes index 174cefb..5b38d28 100644 --- a/build-compare.changes +++ b/build-compare.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 12 09:29:24 UTC 2014 - schwab@suse.de + +- Use $(...) instead of `...` to avoid losing backslash quoting + ------------------------------------------------------------------- Fri Nov 7 11:12:10 UTC 2014 - ohering@suse.de diff --git a/functions.sh b/functions.sh index 772c0e8..3133bfe 100644 --- a/functions.sh +++ b/functions.sh @@ -89,8 +89,8 @@ function cmp_spec () fi # Remember to quote the . which is in release - release1=`$RPM --qf "%{RELEASE}" "$oldrpm"|sed -e 's/\./\\\./g'` - release2=`$RPM --qf "%{RELEASE}" "$newrpm"|sed -e 's/\./\\\./g'` + release1=$($RPM --qf "%{RELEASE}" "$oldrpm"|sed -e 's/\./\\./g') + release2=$($RPM --qf "%{RELEASE}" "$newrpm"|sed -e 's/\./\\./g') # This might happen with a forced rebuild of factory if [ "${release1%.*}" != "${release2%.*}" ] ; then echo "release prefix mismatch" diff --git a/same-build-result.sh b/same-build-result.sh index ddf95b0..3c08a01 100644 --- a/same-build-result.sh +++ b/same-build-result.sh @@ -64,8 +64,8 @@ NEWRPMS=($(find $NEWDIRS -type f -name \*rpm -a ! -name \*src.rpm -a ! -name \*. # Get release from first RPM and keep for rpmlint check # Remember to quote the "." for future regexes -release1=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[0]}"|sed -e 's/\./\\./g'` -release2=`rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"|sed -e 's/\./\\./g'` +release1=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${OLDRPMS[0]}"|sed -e 's/\./\\./g') +release2=$(rpm -qp --nodigest --nosignature --qf "%{RELEASE}" "${NEWRPMS[0]}"|sed -e 's/\./\\./g') SUCCESS=1 rpmqp='rpm -qp --qf %{NAME} --nodigest --nosignature '