summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-03-09 18:49:16 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-03-10 09:47:55 +0100
commit8c98f247e1ad948f9252cb0bb7d19cce4e35f213 (patch)
treee67c11415656c3d6c3e008028657facf8c2068f6
parenta1918d8e730902f8b678ffb58235a0ce03e39214 (diff)
downloadptxdist-8c98f247e1ad948f9252cb0bb7d19cce4e35f213.tar.gz
ptxdist-8c98f247e1ad948f9252cb0bb7d19cce4e35f213.tar.xz
[ptxd_make_] provide and use variable for the fakeroot environment
This patch introduces the variable "pkg_fake_env" which holds the fakeroot environment. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_ipkg_finish.sh5
-rw-r--r--scripts/lib/ptxd_make_world_common.sh1
-rw-r--r--scripts/lib/ptxd_make_world_install.sh8
3 files changed, 8 insertions, 6 deletions
diff --git a/scripts/lib/ptxd_make_ipkg_finish.sh b/scripts/lib/ptxd_make_ipkg_finish.sh
index 8bb2d8f0f..c40f74dc1 100644
--- a/scripts/lib/ptxd_make_ipkg_finish.sh
+++ b/scripts/lib/ptxd_make_ipkg_finish.sh
@@ -23,9 +23,8 @@ ptxd_make_ipkg_finish() {
sed -i -e "s:@DEPENDS@:${dep}:g" "${pkg_ipkg_control}" || return
local -a fake_args
- local fake_env="${ptx_state_dir}/${pkg_label}.fakeroot"
- if [ -f "$fake_env" ]; then
- fake_args=("-i" "$fake_env")
+ if [ -f "${pkg_fake_env}" ]; then
+ fake_args=( "-i" "${pkg_fake_env}" )
fi
fake_args[${#fake_args[@]}]="-u"
{
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index f1315e400..2f20f3525 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -225,6 +225,7 @@ ptxd_make_world_init() {
# xpkg mapping
#
pkg_xpkg_map="${ptx_state_dir}/${pkg_label}.xpkg.map"
+ pkg_fake_env="${ptx_state_dir}/${pkg_label}.fakeroot"
#
# path
diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
index 9df4fbacd..ff49ed5c1 100644
--- a/scripts/lib/ptxd_make_world_install.sh
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -15,9 +15,11 @@
# FIXME: kick ${pkg_install_env}
#
ptxd_make_world_install_pkg() {
- if [ -z "$fakeroot}" ]; then
- fakeargs="-s ${ptx_state_dir}/${pkg_label}.fakeroot"
+ local -a fakeargs
+ if [ -z "${fakeroot}" ]; then
+ fakeargs=( "-s" "${pkg_fake_env}" )
fi
+
"${echo:-echo}" \
"${pkg_path}" \
"${pkg_env}" \
@@ -27,7 +29,7 @@ ptxd_make_world_install_pkg() {
-C "${pkg_build_dir}" \
"${pkg_install_opt}" \
-j1 \
- | "${fakeroot:-fakeroot}" $fakeargs --
+ | "${fakeroot:-fakeroot}" "${fakeargs[@]}" --
check_pipe_status
}
export -f ptxd_make_world_install_pkg