|
|
sub read_make_defaults(); | sub read_make_defaults(); |
sub read_make_globals(); | sub read_make_globals(); |
sub read_packages(); | sub read_packages(); |
|
sub read_parents_pushing($$); |
sub read_profiles(); | sub read_profiles(); |
sub read_sh($); | sub read_sh($); |
sub read_use_defaults(); | sub read_use_defaults(); |
|
|
closedir $pkgdir; | closedir $pkgdir; |
} | } |
| |
|
sub read_parents_pushing($$) { |
|
my ($dirname, $count) = @_; |
|
die "Too many parents in profile.\n" unless $count; |
|
for(noncomments "$dirname/parent") { |
|
read_parents_pushing norm_path($dirname, $_), $count - 1; |
|
} |
|
push @profiles, $dirname; |
|
} |
|
|
sub read_profiles() { | sub read_profiles() { |
$_ = readlink '/etc/make.profile'; | $_ = readlink '/etc/make.profile'; |
die "/etc/make.profile is not a symlink\n" if not defined $_; | die "/etc/make.profile is not a symlink\n" if not defined $_; |
@profiles = norm_path '/etc', $_; |
@profiles = (); |
PARENT: { |
read_parents_pushing norm_path('/etc', $_), 1000; |
for(noncomments "$profiles[0]/parent") { |
|
unshift @profiles, norm_path $profiles[0], $_; |
|
redo PARENT; |
|
} |
|
} |
|
push @profiles, '/etc/portage/profile'; | push @profiles, '/etc/portage/profile'; |
} | } |
| |