Lines 16-21
EPREFIX=${EPREFIX:-$(portageq envvar EPREFIX)}
Link Here
|
16 |
ETC="${EPREFIX}/etc" |
16 |
ETC="${EPREFIX}/etc" |
17 |
USR_SHARE_PORTAGE="${EPREFIX}/usr/share/portage" |
17 |
USR_SHARE_PORTAGE="${EPREFIX}/usr/share/portage" |
18 |
|
18 |
|
|
|
19 |
# Arrays containing the known repository names and repository profile paths |
20 |
PORTAGE_REPOS=( $(portageq get_repos ${EPREFIX}/) ) |
21 |
PORTAGE_REPO_PATHS=( $(portageq get_repo_path ${EPREFIX}/ ${PORTAGE_REPOS[@]}) ) |
22 |
|
19 |
# define error functions so they can be used immediately |
23 |
# define error functions so they can be used immediately |
20 |
fatal() { |
24 |
fatal() { |
21 |
echo -e "ERROR: ${*}" |
25 |
echo -e "ERROR: ${*}" |
Lines 433-438
get_all_make_conf() {
Link Here
|
433 |
# General method of collecting the contents of a profile |
437 |
# General method of collecting the contents of a profile |
434 |
# component by traversing through the cascading profile |
438 |
# component by traversing through the cascading profile |
435 |
# |
439 |
# |
|
|
440 |
# Bug #414961 allows ':' shorthand to resolve to the ${PORTDIR}/profiles |
441 |
# A value before the ':' references the repository, no value means gentoo |
442 |
# |
443 |
# Example: local:base would refer to the profiles directory in the repository |
444 |
# path owned by the 'local' repository |
445 |
# |
436 |
# Arguments: |
446 |
# Arguments: |
437 |
# $1 - Filename (make.profile) |
447 |
# $1 - Filename (make.profile) |
438 |
# [$2] - Current directory (unspecified means to start at the top) |
448 |
# [$2] - Current directory (unspecified means to start at the top) |
Lines 446-455
traverse_profile() {
Link Here
|
446 |
if [[ -f "${curdir}/parent" ]]; then |
456 |
if [[ -f "${curdir}/parent" ]]; then |
447 |
for parent in $(egrep -v '(^#|^ *$)' ${curdir}/parent); do |
457 |
for parent in $(egrep -v '(^#|^ *$)' ${curdir}/parent); do |
448 |
# Bug 231394, handle parent path being absolute |
458 |
# Bug 231394, handle parent path being absolute |
|
|
459 |
index=$(expr index "${parent}" :) |
449 |
if [[ ${parent:0:1} == "/" ]]; then |
460 |
if [[ ${parent:0:1} == "/" ]]; then |
450 |
pdir="$(get_real_path ${parent})" |
461 |
pdir="$(get_real_path ${parent})" |
451 |
else |
462 |
elif [[ $index -eq 0 ]]; then |
452 |
pdir="$(get_real_path ${curdir}/${parent})" |
463 |
pdir="$(get_real_path ${curdir}/${parent})" |
|
|
464 |
else |
465 |
# We have a path with a colon shortcut |
466 |
let i=$index-1 |
467 |
repo="${parent:0:${i}}" |
468 |
[[ -z "${repo}" ]] && repo="gentoo" |
469 |
parent="${parent:$index}" |
470 |
limit=${#PORTAGE_REPOS[@]} |
471 |
for ((i=0; i < limit ; i++)); do |
472 |
if [[ ${repo} == ${PORTAGE_REPOS[i]} ]]; then |
473 |
parent="${PORTAGE_REPO_PATHS[i]}/profiles/${parent}" |
474 |
break |
475 |
fi |
476 |
done |
477 |
pdir="$(get_real_path ${parent})" |
453 |
fi |
478 |
fi |
454 |
rvalue="${rvalue} $(traverse_profile ${1} ${pdir})" |
479 |
rvalue="${rvalue} $(traverse_profile ${1} ${pdir})" |
455 |
done |
480 |
done |
456 |
- |
|
|