aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-10-18 19:54:37 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-10-18 19:54:37 +0100
commit5554e6fdca184112dece728cf31dfa4fa809f990 (patch)
tree0b2d2e6a1b36c4eaf4da508833e3065accaaa5bd
parent4281ebd216749581565b9631acf41c94ceb8f785 (diff)
downloadpaludis-5554e6fdca184112dece728cf31dfa4fa809f990.tar.gz
paludis-5554e6fdca184112dece728cf31dfa4fa809f990.tar.xz
Fix keepdir for ebuilds with subslots
Corresponds to Portage commit e72d835.
-rw-r--r--paludis/repositories/e/ebuild/install_functions.bash7
1 files changed, 4 insertions, 3 deletions
diff --git a/paludis/repositories/e/ebuild/install_functions.bash b/paludis/repositories/e/ebuild/install_functions.bash
index 20da58a..2505331 100644
--- a/paludis/repositories/e/ebuild/install_functions.bash
+++ b/paludis/repositories/e/ebuild/install_functions.bash
@@ -33,6 +33,7 @@ export MOPREFIX="${PN}"
keepdir()
{
+ local keepfile_name=.keep_${CATEGORY}_${PN}-${SLOT%/*}
if [[ ${#} -lt 1 ]]; then
paludis_die_unless_nonfatal "at least one argument needed"
fi
@@ -42,12 +43,12 @@ keepdir()
dodir "$@"
if [[ "${1}" == "-R" ]] || [[ "${1}" == "-r" ]] ; then
shift
- find "$@" -type d -printf "${!PALUDIS_IMAGE_DIR_VAR}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\0" | xargs -0 touch
- paludis_assert_unless_nonfatal "Failed to create .keep_${CATEGORY}_${PN}-${SLOT} files" || return 247
+ find "$@" -type d -printf "${!PALUDIS_IMAGE_DIR_VAR}/%p/${keepfile_name}\0" | xargs -0 touch
+ paludis_assert_unless_nonfatal "Failed to create ${keepfile_name} files" || return 247
else
local f
for f in "$@" ; do
- touch "${!PALUDIS_IMAGE_DIR_VAR}/${f}/.keep_${CATEGORY}_${PN}-${SLOT}" || paludis_die_unless_nonfatal "Couldn't touch .keep_${CATEGORY}_${PN}-${SLOT} in ${f}" || return 247
+ touch "${!PALUDIS_IMAGE_DIR_VAR}/${f}/${keepfile_name}" || paludis_die_unless_nonfatal "Couldn't touch ${keepfile_name} in ${f}" || return 247
done
fi
}