Skip to content

Commit

Permalink
Need these so that SplitOffs use the same BuildAsNobody: setting as t…
Browse files Browse the repository at this point in the history
…heir parents.
  • Loading branch information
akhansen committed Jul 30, 2012
1 parent 53a3f70 commit 951a7c0
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions perlmod/Fink/PkgVersion.pm
Expand Up @@ -5131,8 +5131,12 @@ sub run_script {
# Run the script under the modified environment
my $result;
# Don't build as nobody if BuildAsNobody: false
my $build_as_nobody = $self->param_boolean("BuildAsNobody", 1);

my $build_as_nobody;
if ($self->has_parent()) {
$build_as_nobody = $self->get_parent()->param_boolean("BuildAsNobody", 1);
} else {
$build_as_nobody = $self->param_boolean("BuildAsNobody", 1);
}
$nonroot_okay = $nonroot_okay && $build_as_nobody;
{
local %ENV = %{$self->get_env($phase)};
Expand Down Expand Up @@ -5736,7 +5740,15 @@ Otherwise, return the results from Fink::Config::build_as_user_group()
sub pkg_build_as_user_group {
my $self = shift;
my $result;
if ($self->param_boolean("BuildAsNobody", 1)) {
my $build_as_nobody;
if ($self->has_parent()) {
#splitoff
$build_as_nobody = $self->get_parent()->param_boolean("BuildAsNobody", 1);
} else {
#parent
$build_as_nobody = $self->param_boolean("BuildAsNobody", 1);
}
if ($build_as_nobody) {
$result = Fink::Config::build_as_user_group();
} else {
#package specifies 'BuildAsNobody: false'
Expand Down

0 comments on commit 951a7c0

Please sign in to comment.