aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-07 19:27:10 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-07 19:27:10 +0000
commit9f141851f6873296fcf3554aca2e8286f9888620 (patch)
tree0a0f17f8b51845dbc3d467100cd2ed5ea983facb
parenta56b9121107464c5b824e7c31e09b5f69d220101 (diff)
downloadpaludis-9f141851f6873296fcf3554aca2e8286f9888620.tar.gz
paludis-9f141851f6873296fcf3554aca2e8286f9888620.tar.xz
Fix distcheck
-rw-r--r--ebuild/builtin_merge.bash14
-rw-r--r--ebuild/builtin_unmerge.bash7
2 files changed, 15 insertions, 6 deletions
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
index a0faab9..78220b3 100644
--- a/ebuild/builtin_merge.bash
+++ b/ebuild/builtin_merge.bash
@@ -75,11 +75,18 @@ builtin_merge()
( set ; export -p | sed 's:^declare -rx:declare -x:' ) | bzip2 > ${dbdir}/environment.bz2
> ${dbdir}/CONTENTS
+ local merge=${PALUDIS_EBUILD_DIR}/merge
+ [[ -x "${merge}" ]] || merge="${PALUDIS_EBUILD_DIR_FALLBACK}"/merge
+ [[ -x "${merge}" ]] || die "Couldn't find merge"
+
+ local unmerge=${PALUDIS_EBUILD_DIR}/unmerge
+ [[ -x "${unmerge}" ]] || unmerge="${PALUDIS_EBUILD_DIR_FALLBACK}"/unmerge
+ [[ -x "${unmerge}" ]] || die "Couldn't find unmerge"
+
if [[ -n "${D}" ]] && [[ -d "${D}" ]] ; then
install -d "${ROOT%/}/" || die "couldn't make \${ROOT} (\"${ROOT}\")"
if [[ -d "${D}" ]] ; then
- "${PALUDIS_EBUILD_DIR}/"merge "${D%/}/" "${ROOT%/}/" "${dbdir}/CONTENTS" \
- || die "merge failed"
+ ${merge} "${D%/}/" "${ROOT%/}/" "${dbdir}/CONTENTS" || die "merge failed"
fi
fi
@@ -89,8 +96,7 @@ builtin_merge()
fi
if [[ -n "${reinstall}" ]] ; then
- "${PALUDIS_EBUILD_DIR}/"unmerge "${ROOT%/}/" "${dbdir}/OLDCONTENTS" \
- || die "unmerge failed"
+ ${unmerge} "${ROOT%/}/" "${dbdir}/OLDCONTENTS" || die "unmerge failed"
if ! /bin/sh -c 'echo Good, our shell is still usable' ; then
echo "Looks like our shell broke. Trying an ldconfig to fix it..."
diff --git a/ebuild/builtin_unmerge.bash b/ebuild/builtin_unmerge.bash
index 195ef4d..a49dae3 100644
--- a/ebuild/builtin_unmerge.bash
+++ b/ebuild/builtin_unmerge.bash
@@ -73,8 +73,11 @@ builtin_unmerge()
export CONFIG_PROTECT="${CONFIG_PROTECT}"
export CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK}"
- "${PALUDIS_EBUILD_DIR}/"unmerge "${ROOT}/" "${dbdir}/CONTENTS" \
- || die "unmerge failed"
+ local unmerge=${PALUDIS_EBUILD_DIR}/unmerge
+ [[ -x "${unmerge}" ]] || unmerge="${PALUDIS_EBUILD_DIR_FALLBACK}"/unmerge
+ [[ -x "${unmerge}" ]] || die "Couldn't find unmerge"
+
+ ${unmerge} "${ROOT}/" "${dbdir}/CONTENTS" || die "unmerge failed"
if ! /bin/sh -c 'echo Good, our shell is still usable' ; then
echo "Looks like our shell broke. Trying an ldconfig to fix it..."