From 5a3afc8f659a01ac295e24383ec4ac18e7d58cef Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 4 Dec 2012 13:22:38 +0000 Subject: Allow setting some env variables to define and default to setting PERL_EXTUTILS_AUTOINSTALL and PERL_AUTOINSTALL to --skipdeps --- NEWS | 3 +++ iurt | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/NEWS b/NEWS index 105fe8e..f7a28b7 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ - kill build if nothing is printed for 5 minutes and system is idle - write status file even if the build is successful +- allow setting some env variables to define and default to + setting PERL_EXTUTILS_AUTOINSTALL and PERL_AUTOINSTALL to + --skipdeps 0.6.13 - use rpmbuild/ rather than rpm/ diff --git a/iurt b/iurt index 28642ba..bedac33 100755 --- a/iurt +++ b/iurt @@ -479,6 +479,10 @@ my %config_usage = ( desc => 'Domain to append to usernames when sending emails', default => 'mageia.org' }, + env => { + desc => 'Environment variables to export', + default => { PERL_EXTUTILS_AUTOINSTALL => "--skipdeps", PERL_AUTOINSTALL => "--skipdeps" } + }, home => { desc => 'Home dir', default => $HOME @@ -565,6 +569,14 @@ if (!$arch_comp{$real_arch}{$run{my_arch}}) { } config_init(\%config_usage, $config, \%run); +if ($config->{env}) { + foreach my $var (keys %{$config->{env}}) { + print "$var\n"; + print $config->{env}->{$var}."\n"; + $ENV{$var} = $config->{env}->{$var}; + } +} + $config->{upload} .= $run{distro}; $config->{upload} =~ s/community//g; if ($run{distro} ne 'cooker') { -- cgit v1.2.1