[opensuse-buildservice] [Patch] support setting of different _target_arch
Hi ! In preparation to my GSoC project (openSUSE@arm) I'd like to propose this patch of Build.pm for inclusion into the Build Service code. =================================================================== --- Build.pm (Revision 7227) +++ Build.pm (Arbeitskopie) @@ -216,6 +216,9 @@ $config->{'patterntype'} = [ @l ]; } elsif ($l0 eq 'release:') { $config->{'release'} = $l[0]; + } elsif ($l0 eq 'changetargetarch:') { + @macros = grep {$_ !~ /^%define _target_cpu/ } @macros; + push @macros, "%define _target_cpu @l"; } elsif ($l0 !~ /^[#%]/) { warn("unknown keyword in config: $l0\n"); } Reasoning: Some lines above in Build.pm %_target_arch gets set to the scheduler arch (scheduler name). In ARM world this is a bit more complicated - e.g. there's armv5tel, armv5tejl, armv5tevl . This is no problem in debian world IIRC as we see so far in Mer. Unfortunately rpmbuild needs to know the right value (armv5tel instead of armv5el). It would be bad to use now different schedulers only for tel/tejl/tevl and so on. So with my patch we can use still the armv5el scheduler and differ through "changetargetarch:" the _target_cpu where needed. Best, Jan-Simon
On Thu, Apr 30, 2009 at 05:28:54PM +0200, Jan-Simon Möller wrote:
In preparation to my GSoC project (openSUSE@arm) I'd like to propose this patch of Build.pm for inclusion into the Build Service code.
=================================================================== --- Build.pm (Revision 7227) +++ Build.pm (Arbeitskopie) @@ -216,6 +216,9 @@ $config->{'patterntype'} = [ @l ]; } elsif ($l0 eq 'release:') { $config->{'release'} = $l[0]; + } elsif ($l0 eq 'changetargetarch:') { + @macros = grep {$_ !~ /^%define _target_cpu/ } @macros; + push @macros, "%define _target_cpu @l"; } elsif ($l0 !~ /^[#%]/) { warn("unknown keyword in config: $l0\n"); }
Why do you need an extra keyword for this? Just add _target_cpu mumble to the Macros: section of the config. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Jan-Simon Möller
-
Michael Schroeder