[poky] [PATCH 6/7] package_rpm: use target vendor information

Mark Hatle mark.hatle at windriver.com
Fri May 6 11:02:36 PDT 2011


On 5/6/11 12:19 PM, Darren Hart wrote:
> Hi Adrian,

With the issue fixed below, this looks like a good change to me.

--Mark

> One issue below:
> 
> On 05/05/2011 12:11 PM, Adrian Alonso wrote:
>> * Instead of hardcoding target vendor string "-poky"
>>   use TARGET_VENDOR information in case of using external
>>   toolchains
>>
>> Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
>> ---
>>  meta/classes/package_rpm.bbclass |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
>> index 70170d1..1cf9f79 100644
>> --- a/meta/classes/package_rpm.bbclass
>> +++ b/meta/classes/package_rpm.bbclass
>> @@ -761,13 +761,14 @@ python do_package_rpm () {
>>  	# Setup the rpmbuild arguments...
>>  	rpmbuild = bb.data.getVar('RPMBUILD', d, True)
>>  	targetsys = bb.data.getVar('TARGET_SYS', d, True)
>> +	targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
>>  	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
>>  	pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
>>  	bb.mkdirhier(pkgwritedir)
>>  	os.chmod(pkgwritedir, 0755)
>>  
>>  	cmd = rpmbuild
>> -	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
>> +	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + targetvendor + "-linux-gnu --buildroot " + pkgd
> 
> You need:
>  + "-" + targetvendor
> 
> otherwise you'll merge pkgarch and targetvendor together without a delimiter.
> Better yet, just format the string in one go and reduce the potential for error:
> 
> cmd = "%s --nodeps --short-circuit --target %s-%s-linux-gnu --buildroot %s" % \
>       (rpmbuild, pkgarch, targetvendor, pkgd)
> 




More information about the poky mailing list