From: Zhang Qiang Date: Tue, 18 Jun 2013 05:09:38 +0000 (+0800) Subject: get target arch from build conf if target is set X-Git-Tag: 0.8~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9855745f38f51387ef73f283a2a1fc8a69d7f53a;p=tools%2Fdepanneur.git get target arch from build conf if target is set This fix the bug that different arch packages generated from gbs and obs if 'Target:' set in build conf, eg: %ifarch i586 Target: i686-tizen-linux %endif %ifarch armv7hl Target: armv7hl-tizen-linux %endif %ifarch armv7l Target: armv7l-tizen-linux %endif In that case, obs will generated i686 package, but gbs will generated i586. Change-Id: If879f364ba12db737714172e57c5566f7f7633d8 --- diff --git a/depanneur b/depanneur index d1059a3..92cbd69 100755 --- a/depanneur +++ b/depanneur @@ -1256,6 +1256,13 @@ sub build_package { } else { warning("depanneur only support linux platform"); } + my $target_arch=`$build_dir/getchangetarget --dist $dist --configdir $dist_configs --archpath $arch`; + chomp $target_arch; + if ($target_arch eq "") { + push @args, "--target $arch"; + } else { + push @args, "--target $target_arch"; + } push @args, "--jobs " . $nprocessors * 2; push @args, "--no-init" if ($noinit == 1); push @args, "--keep-packs" if ($keep_packs == 1); @@ -1263,7 +1270,6 @@ sub build_package { push @args, "--dist $dist"; push @args, "--configdir $dist_configs"; push @args, "--arch $archpath"; - push @args, "--target $arch"; push @args, "$srpm_filename"; push @args, "--ccache" if ($ccache); push @args, "--baselibs" if ($create_baselibs);