summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjingui.ren <jingui.ren@samsung.com>2018-06-12 19:51:01 +0800
committerjingui.ren <jingui.ren@samsung.com>2018-06-12 19:55:12 +0800
commit35811e3151c524e235a9ba5271f3143375b39d7c (patch)
tree0d2bdd04a3a387d43f5399764ccd32bed28186df
parent0c6573a6658bfbd7153afa3fe9073b8700261242 (diff)
downloadbuild-35811e3151c524e235a9ba5271f3143375b39d7c.tar.gz
build-35811e3151c524e235a9ba5271f3143375b39d7c.tar.bz2
build-35811e3151c524e235a9ba5271f3143375b39d7c.zip
fix BUILD_ROOT variable read error
Change-Id: Icf7eab6730a5523d98e0eee20dc466191f92a271
-rwxr-xr-xbuild2
-rw-r--r--build-pkg-arch2
-rw-r--r--build-pkg-deb26
3 files changed, 15 insertions, 15 deletions
diff --git a/build b/build
index c02e12b..fd11b70 100755
--- a/build
+++ b/build
@@ -441,7 +441,7 @@ setupccache() {
echo 'export PATH=/usr/lib/icecc/bin:/opt/icecream/bin:/usr/bin:$PATH' >> "$BUILD_ROOT"/var/lib/build/ccache/bin/$i
echo "ccache $i \"\$@\"" >> "$BUILD_ROOT"/var/lib/build/ccache/bin/$i
chmod 755 "$BUILD_ROOT"/var/lib/build/ccache/bin/$i
- echo "Installed ccache wrapper as '$BUILD_ROOT'/var/lib/build/ccache/bin/$i"
+ echo "Installed ccache wrapper as $BUILD_ROOT/var/lib/build/ccache/bin/$i"
done
fi
mkdir -p "$BUILD_ROOT/.ccache"
diff --git a/build-pkg-arch b/build-pkg-arch
index be5dac5..3328700 100644
--- a/build-pkg-arch
+++ b/build-pkg-arch
@@ -68,7 +68,7 @@ pkg_preinstall_arch() {
}
pkg_runscripts_arch() {
- if test -e "'$BUILD_ROOT'/.init_b_cache/scripts/$PKG.post" ; then
+ if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then
echo "running $PKG postinstall script"
( cd "$BUILD_ROOT" && chroot "$BUILD_ROOT" ".init_b_cache/scripts/$PKG.post" < /dev/null )
rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post"
diff --git a/build-pkg-deb b/build-pkg-deb
index 2ee0f95..6f625b2 100644
--- a/build-pkg-deb
+++ b/build-pkg-deb
@@ -41,24 +41,24 @@ deb_chroot ()
}
deb_setup() {
- mkdir -p $"BUILD_ROOT"/var/lib/dpkg
- mkdir -p $"BUILD_ROOT"/var/log
- mkdir -p $"BUILD_ROOT"/etc/default
- :>> $"BUILD_ROOT"/var/lib/dpkg/status
- :>> $"BUILD_ROOT"/var/lib/dpkg/available
- :>> $"BUILD_ROOT"/var/log/dpkg.log
- :>> $"BUILD_ROOT"/etc/ld.so.conf
- :>> $"BUILD_ROOT"/etc/default/rcS
+ mkdir -p "$BUILD_ROOT"/var/lib/dpkg
+ mkdir -p "$BUILD_ROOT"/var/log
+ mkdir -p "$BUILD_ROOT"/etc/default
+ :>> "$BUILD_ROOT"/var/lib/dpkg/status
+ :>> "$BUILD_ROOT"/var/lib/dpkg/available
+ :>> "$BUILD_ROOT"/var/log/dpkg.log
+ :>> "$BUILD_ROOT"/etc/ld.so.conf
+ :>> "$BUILD_ROOT"/etc/default/rcS
}
pkg_initdb_deb() {
deb_setup
# force dpkg into database to make epoch test work
- if ! test "'$BUILD_ROOT'/.init_b_cache/rpms/dpkg.deb" -ef "'$BUILD_ROOT'/.init_b_cache/dpkg.deb" ; then
- rm -f $"BUILD_ROOT"/.init_b_cache/dpkg.deb
- cp $"BUILD_ROOT"/.init_b_cache/rpms/dpkg.deb $"BUILD_ROOT"/.init_b_cache/dpkg.deb || cleanup_and_exit 1
+ if ! test "$BUILD_ROOT/.init_b_cache/rpms/dpkg.deb" -ef "$BUILD_ROOT/.init_b_cache/dpkg.deb" ; then
+ rm -f "$BUILD_ROOT"/.init_b_cache/dpkg.deb
+ cp "$BUILD_ROOT"/.init_b_cache/rpms/dpkg.deb "$BUILD_ROOT"/.init_b_cache/dpkg.deb || cleanup_and_exit 1
fi
- deb_chroot $"BUILD_ROOT" dpkg --install --force-depends .init_b_cache/dpkg.deb >/dev/null 2>&1
+ deb_chroot "$BUILD_ROOT" dpkg --install --force-depends .init_b_cache/dpkg.deb >/dev/null 2>&1
}
pkg_prepare_deb() {
@@ -66,7 +66,7 @@ pkg_prepare_deb() {
}
pkg_install_deb() {
- ( deb_chroot $"BUILD_ROOT" dpkg --install --force-depends .init_b_cache/$PKG.deb 2>&1 || touch $"BUILD_ROOT"/exit ) | \
+ ( deb_chroot "$BUILD_ROOT" dpkg --install --force-depends .init_b_cache/$PKG.deb 2>&1 || touch "$BUILD_ROOT"/exit ) | \
perl -ne '$|=1;/^(Configuration file|Installing new config file|Selecting previously deselected|Selecting previously unselected|\(Reading database|Unpacking |Setting up|Creating config file|Preparing to replace dpkg|Preparing to unpack )/||/^$/||print'
# ugly workaround for upstart system. some packages (procps) try
# to start a service in their configure phase. As we don't have