aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-03-14 14:23:35 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-03-14 14:23:35 +0000
commitf02b8cb2d9ee720a3ae97b070a00f36e3aa832f5 (patch)
treee64e71bb920b7c0245a209156680b3bd4d33dd94
parent87fb8afdfa75a9f8d3411cf61d08f8543554e876 (diff)
downloadpaludis-f02b8cb2d9ee720a3ae97b070a00f36e3aa832f5.tar.gz
paludis-f02b8cb2d9ee720a3ae97b070a00f36e3aa832f5.tar.xz
Make dobin and dosbin behave more like portage.
-rw-r--r--paludis/repositories/e/ebuild/utils/Makefile.am1
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dobin5
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosbin10
3 files changed, 9 insertions, 7 deletions
diff --git a/paludis/repositories/e/ebuild/utils/Makefile.am b/paludis/repositories/e/ebuild/utils/Makefile.am
index 9c260ed..df81873 100644
--- a/paludis/repositories/e/ebuild/utils/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/Makefile.am
@@ -76,6 +76,7 @@ TESTS_ENVIRONMENT = env \
TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \
PALUDIS_EBUILD_LOG_LEVEL="silent" \
PALUDIS_DISTRIBUTION="gentoo" \
+ PALUDIS_NO_CHOWN="yes" \
TEST_SCRIPT_DIR="$(srcdir)/" \
bash $(top_srcdir)/paludis/repositories/e/ebuild/utils/run_test.bash
diff --git a/paludis/repositories/e/ebuild/utils/dobin b/paludis/repositories/e/ebuild/utils/dobin
index 8c62f2b..c7901b5 100755
--- a/paludis/repositories/e/ebuild/utils/dobin
+++ b/paludis/repositories/e/ebuild/utils/dobin
@@ -37,10 +37,9 @@ fi
ret=0
for x in "$@" ; do
- if [[ -x "${x}" ]]; then
- install "${x}" "${D}${DESTTREE}/bin" || ret=2
+ if [[ -n ${PALUDIS_NO_CHOWN} ]]; then
+ install -m0755 "${x}" "${D}${DESTTREE}/bin" || ret=2
else
- echo ">>> ${0}: making ${x} executable..."
install -m0755 -o root -g 0 "${x}" "${D}${DESTTREE}/bin" || ret=2
fi
done
diff --git a/paludis/repositories/e/ebuild/utils/dosbin b/paludis/repositories/e/ebuild/utils/dosbin
index 218baa4..c72d9c5 100755
--- a/paludis/repositories/e/ebuild/utils/dosbin
+++ b/paludis/repositories/e/ebuild/utils/dosbin
@@ -35,11 +35,13 @@ if [[ ! -d "${D}${DESTTREE}/sbin" ]]; then
install -d "${D}${DESTTREE}/sbin" || exit 3
fi
+ret=0
for x in "$@"; do
- if [[ -x ${x} ]]; then
- install -m0755 "${x}" "${D}${DESTTREE}/sbin" || exit 2
+ if [[ -n ${PALUDIS_NO_CHOWN} ]]; then
+ install -m0755 "${x}" "${D}${DESTTREE}/sbin" || ret=2
else
- echo ">>> dosbin: making ${x} executable..."
- install -m0755 -o root -g 0 "${x}" "${D}${DESTTREE}/sbin" || exit 2
+ install -m0755 -o root -g 0 "${x}" "${D}${DESTTREE}/sbin" || ret=2
fi
done
+
+exit ${ret}