diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2019-07-12 12:13:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-15 09:29:59 +0100 |
commit | d692ff5c893bfc55dcd94500edfeaf657022f5e5 (patch) | |
tree | cc7e51b906dbfca351ba47655cf42396b688e6c1 /meta/recipes-core | |
parent | adb34c109832b2626af7fef4793c92abfc5b9dfe (diff) | |
download | poky-d692ff5c893bfc55dcd94500edfeaf657022f5e5.tar.gz |
glibc-package.inc: Do not use bitbake variable syntax for shell variables
Using bitbake variable syntax (i.e., ${FOO}) for shell variables is
bad practice. First of all it is confusing, but more importantly it
can lead to weird problems if someone actually defines a bitbake
variable with the same name as the shell variable.
Also correct the indentation in stash_locale_cleanup().
(From OE-Core rev: 4e303063db731feae192314bab2ca16d26192dbb)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/glibc/glibc-package.inc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 5cfb1b6ab9..b150a34378 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc | |||
@@ -161,34 +161,34 @@ bashscripts = "mtrace sotruss xtrace" | |||
161 | 161 | ||
162 | do_stash_locale () { | 162 | do_stash_locale () { |
163 | dest=${LOCALESTASH} | 163 | dest=${LOCALESTASH} |
164 | install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir} | 164 | install -d $dest${base_libdir} $dest${bindir} $dest${libdir} $dest${datadir} |
165 | # Hide away the locale data from the deployment | 165 | # Hide away the locale data from the deployment |
166 | if [ -e ${D}${bindir}/localedef ]; then | 166 | if [ -e ${D}${bindir}/localedef ]; then |
167 | cp -a ${D}${bindir}/localedef ${dest}${bindir} | 167 | cp -a ${D}${bindir}/localedef $dest${bindir} |
168 | fi | 168 | fi |
169 | if [ -e ${D}${libdir}/gconv ]; then | 169 | if [ -e ${D}${libdir}/gconv ]; then |
170 | cp -a ${D}${libdir}/gconv ${dest}${libdir} | 170 | cp -a ${D}${libdir}/gconv $dest${libdir} |
171 | fi | 171 | fi |
172 | if [ -e ${D}${datadir}/i18n ]; then | 172 | if [ -e ${D}${datadir}/i18n ]; then |
173 | cp -a ${D}${datadir}/i18n ${dest}${datadir} | 173 | cp -a ${D}${datadir}/i18n $dest${datadir} |
174 | fi | 174 | fi |
175 | 175 | ||
176 | # Make a copy of all the libraries into the locale stash | 176 | # Make a copy of all the libraries into the locale stash |
177 | cp -fpPR ${D}${libdir}/* ${dest}${libdir} | 177 | cp -fpPR ${D}${libdir}/* $dest${libdir} |
178 | if [ "${base_libdir}" != "${libdir}" ]; then | 178 | if [ "${base_libdir}" != "${libdir}" ]; then |
179 | cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir} | 179 | cp -fpPR ${D}${base_libdir}/* $dest${base_libdir} |
180 | fi | 180 | fi |
181 | if [ -e ${D}${exec_prefix}/lib ]; then | 181 | if [ -e ${D}${exec_prefix}/lib ]; then |
182 | if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then | 182 | if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then |
183 | cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix} | 183 | cp -fpPR ${D}${exec_prefix}/lib $dest${exec_prefix} |
184 | fi | 184 | fi |
185 | fi | 185 | fi |
186 | 186 | ||
187 | cp -fpPR ${D}${datadir}/* ${dest}${datadir} | 187 | cp -fpPR ${D}${datadir}/* $dest${datadir} |
188 | rm -rf ${D}${datadir}/locale/ | 188 | rm -rf ${D}${datadir}/locale/ |
189 | cp -fpPR ${WORKDIR}/SUPPORTED ${dest} | 189 | cp -fpPR ${WORKDIR}/SUPPORTED $dest |
190 | 190 | ||
191 | target=${dest}/scripts | 191 | target=$dest/scripts |
192 | mkdir -p $target | 192 | mkdir -p $target |
193 | for i in ${bashscripts}; do | 193 | for i in ${bashscripts}; do |
194 | if [ -f ${D}${bindir}/$i ]; then | 194 | if [ -f ${D}${bindir}/$i ]; then |
@@ -216,23 +216,23 @@ stash_locale_cleanup () { | |||
216 | cleanupdir=$1 | 216 | cleanupdir=$1 |
217 | # Remove all files which do_stash_locale() copies | 217 | # Remove all files which do_stash_locale() copies |
218 | for i in ${bashscripts}; do | 218 | for i in ${bashscripts}; do |
219 | rm -f ${cleanupdir}${bindir}/$i | 219 | rm -f $cleanupdir${bindir}/$i |
220 | done | 220 | done |
221 | rm -f ${cleanupdir}${bindir}/localedef | 221 | rm -f $cleanupdir${bindir}/localedef |
222 | rm -rf ${cleanupdir}${datadir}/i18n | 222 | rm -rf $cleanupdir${datadir}/i18n |
223 | rm -rf ${cleanupdir}${libdir}/gconv | 223 | rm -rf $cleanupdir${libdir}/gconv |
224 | rm -rf ${cleanupdir}/${localedir} | 224 | rm -rf $cleanupdir${localedir} |
225 | rm -rf ${cleanupdir}${datadir}/locale | 225 | rm -rf $cleanupdir${datadir}/locale |
226 | if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then | 226 | if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then |
227 | if [ -d "${cleanupdir}${exec_prefix}/lib" ]; then | 227 | if [ -d "$cleanupdir${exec_prefix}/lib" ]; then |
228 | if [ -z "${ARCH_DYNAMIC_LOADER}" -o \ | 228 | if [ -z "${ARCH_DYNAMIC_LOADER}" -o \ |
229 | ! -e "${cleanupdir}${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then | 229 | ! -e "$cleanupdir${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then |
230 | # error out if directory isn't empty | 230 | # error out if directory isn't empty |
231 | # this dir should only contain locale dir | 231 | # this dir should only contain locale dir |
232 | # which has been deleted in the previous step | 232 | # which has been deleted in the previous step |
233 | rmdir ${cleanupdir}${exec_prefix}/lib | 233 | rmdir $cleanupdir${exec_prefix}/lib |
234 | fi | ||
234 | fi | 235 | fi |
235 | fi | ||
236 | fi | 236 | fi |
237 | } | 237 | } |
238 | 238 | ||