Line
Link Here
|
0 |
-- a/eclass/webapp.eclass |
0 |
++ a/eclass/webapp.eclass |
Lines 83-88
Link Here
|
83 |
fi |
83 |
fi |
84 |
} |
84 |
} |
85 |
|
85 |
|
|
|
86 |
webapp_checkdirexists() { |
87 |
debug-print-function $FUNCNAME $* |
88 |
|
89 |
local my_prefix=${2:+${2}/} |
90 |
|
91 |
if [[ ! -d "${my_prefix}${1}" ]]; then |
92 |
msg="ebuild fault: dir '${1}' not found" |
93 |
eerror "$msg" |
94 |
eerror "Please report this as a bug at http://bugs.gentoo.org/" |
95 |
die "$msg" |
96 |
fi |
97 |
} |
98 |
|
86 |
webapp_check_installedat() { |
99 |
webapp_check_installedat() { |
87 |
debug-print-function $FUNCNAME $* |
100 |
debug-print-function $FUNCNAME $* |
88 |
${WEBAPP_CONFIG} --show-installed -h localhost -d "${INSTALL_DIR}" 2> /dev/null |
101 |
${WEBAPP_CONFIG} --show-installed -h localhost -d "${INSTALL_DIR}" 2> /dev/null |
Lines 236-242
Link Here
|
236 |
cp "${2}" "${D}/${MY_APPDIR}/postupgrade-${1}.txt" |
249 |
cp "${2}" "${D}/${MY_APPDIR}/postupgrade-${1}.txt" |
237 |
} |
250 |
} |
238 |
|
251 |
|
239 |
# helper for webapp_serverowned() |
252 |
# helpers for webapp_serverowned() |
240 |
_webapp_serverowned() { |
253 |
_webapp_serverowned() { |
241 |
debug-print-function $FUNCNAME $* |
254 |
debug-print-function $FUNCNAME $* |
242 |
|
255 |
|
Lines 248-253
Link Here
|
248 |
echo "${my_file}" >> "${D}/${WA_SOLIST}" |
261 |
echo "${my_file}" >> "${D}/${WA_SOLIST}" |
249 |
} |
262 |
} |
250 |
|
263 |
|
|
|
264 |
_webapp_recursive_serverowned() { |
265 |
debug-print-function $FUNCNAME $* |
266 |
|
267 |
webapp_checkdirexists "${1}" "${D}" |
268 |
local my_dir="$(webapp_strip_appdir "${1}")" |
269 |
my_dir="$(webapp_strip_cwd "${my_dir}")" |
270 |
|
271 |
elog "(server recursively owned) ${my_dir}" |
272 |
echo "${my_dir}" >> "${D}/${WA_SODLIST}" |
273 |
} |
274 |
|
251 |
# @FUNCTION: webapp_serverowned |
275 |
# @FUNCTION: webapp_serverowned |
252 |
# @USAGE: [-R] <file> [more files ...] |
276 |
# @USAGE: [-R] <file> [more files ...] |
253 |
# @DESCRIPTION: |
277 |
# @DESCRIPTION: |
Lines 257-270
Link Here
|
257 |
webapp_serverowned() { |
281 |
webapp_serverowned() { |
258 |
debug-print-function $FUNCNAME $* |
282 |
debug-print-function $FUNCNAME $* |
259 |
|
283 |
|
260 |
local a m |
284 |
local m |
261 |
if [[ "${1}" == "-R" ]]; then |
285 |
if [[ "${1}" == "-R" ]]; then |
262 |
shift |
286 |
shift |
263 |
for m in "$@"; do |
287 |
for m in "$@"; do |
264 |
find "${D}${m}" | while read a; do |
288 |
_webapp_recursive_serverowned "${m}" |
265 |
a=$(webapp_strip_d "${a}") |
|
|
266 |
_webapp_serverowned "${a}" |
267 |
done |
268 |
done |
289 |
done |
269 |
else |
290 |
else |
270 |
for m in "$@"; do |
291 |
for m in "$@"; do |