From: Huang Hao Date: Thu, 27 Sep 2012 04:14:28 +0000 (+0800) Subject: Set ENV variable in main thread. X-Git-Tag: 0.2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fb212d1a5c8c8664239fc7dc803af6c6c1cfd1d;p=tools%2Fdepanneur.git Set ENV variable in main thread. Change-Id: If968325d996cd991db01887073d4d20af90450e2 --- diff --git a/depanneur b/depanneur index 7be3f39..1ec0430 100755 --- a/depanneur +++ b/depanneur @@ -83,6 +83,7 @@ my $order_dir = "$build_root/local/order"; my $cache_dir = "$build_root/local/cache"; my $groupfile="$build_root/meta/group.xml"; my $build_dir = "$virtualenv/usr/lib/build"; +$ENV{'BUILD_DIR'} = $build_dir; # must change env variable in main thread my $config_filename = "$build_root/meta/local.yaml"; my $dist_configs = "$build_root/meta/dist"; my $exclude_from_file = "$build_root/meta/exclude"; @@ -765,8 +766,6 @@ sub build_package { # Rebuild the package. info("*** building $name-$version-$release $arch $dist (worker: $thread) ***"); - $ENV{'BUILD_DIR'} = $build_dir; - if ( -d "$localrepo/$dist/$arch/RPMS" ) { push @args, "--repository $localrepo/$dist/$arch/RPMS"; }