This is required by PMS section 11.3.3.8 "Installation commands".
Fixes bug #481762.
--- /dev/null
+#!/bin/bash
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
+if ! ___eapi_has_prefix_variables; then
+ ED=${D}
+fi
+
+dodir "$@"
+ret=$?
+
+for x in "$@"; do
+ >> "${ED}${x}/.keep_${CATEGORY}_${PN}-${SLOT%/*}" || \
+ { echo "!!! ${0##*/}: cannot write .keep in ${ED}${x}" 1>&2; ret=1; }
+done
+
+[[ ${ret} -ne 0 ]] && __helpers_die "${0##*/} failed"
+exit ${ret}
# in global scope, even though they are completely useless during
# the "depend" phase.
for x in diropts docompress exeopts get_KV insopts \
- keepdir KV_major KV_micro KV_minor KV_to_int \
+ KV_major KV_micro KV_minor KV_to_int \
libopts register_die_hook register_success_hook \
__strip_duplicate_slashes \
use_with use_enable ; do
fi
}
-# adds ".keep" files so that dirs aren't auto-cleaned
-keepdir() {
- dodir "$@"
- local x
- if ! ___eapi_has_prefix_variables; then
- local ED=${D}
- fi
- if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then
- shift
- find "$@" -type d -printf "${ED}%p/.keep_${CATEGORY}_${PN}-${SLOT%/*}\n" \
- | tr "\n" "\0" | \
- while read -r -d $'\0' ; do
- >> "$REPLY" || \
- die "Failed to recursively create .keep files"
- done
- else
- for x in "$@"; do
- >> "${ED}${x}/.keep_${CATEGORY}_${PN}-${SLOT%/*}" || \
- die "Failed to create .keep in ${ED}${x}"
- done
- fi
-}
-
-
useq() {
has $EBUILD_PHASE prerm postrm || eqawarn \
"QA Notice: The 'useq' function is deprecated (replaced by 'use')"
addread addwrite adddeny addpredict __sb_append_var \
use usev useq has_version portageq \
best_version use_with use_enable register_die_hook \
- keepdir unpack __strip_duplicate_slashes econf einstall \
+ unpack __strip_duplicate_slashes econf einstall \
__dyn_setup __dyn_unpack __dyn_clean \
into insinto exeinto docinto \
insopts diropts exeopts libopts docompress \
<listitem><para>docompress</para></listitem>
<listitem><para>exeopts</para></listitem>
<listitem><para>insopts</para></listitem>
- <listitem><para>keepdir</para></listitem>
<listitem><para>libopts</para></listitem>
<listitem><para>use</para></listitem>
<listitem><para>use_enable</para></listitem>
<listitem><para>docompress</para></listitem>
<listitem><para>exeopts</para></listitem>
<listitem><para>insopts</para></listitem>
- <listitem><para>keepdir</para></listitem>
<listitem><para>libopts</para></listitem>
<listitem><para>use</para></listitem>
<listitem><para>use_enable</para></listitem>