[meta-intel] [PATCH] lms7: re-write do_unpack to fix warning

Saul Wold sgw at linux.intel.com
Wed Apr 15 12:10:51 PDT 2015


On 04/15/2015 11:11 AM, Darren Hart wrote:
>
>
> On 4/10/15 7:47 AM, Saul Wold wrote:
>> Since the primary tarball unpacks into a non-standard directory create
>> a do_unpack that sets and resets  to first unpack the primary tarball
>> and then unpacks the actual src tarball into the correct directory.
>>
>> This is similar to lsof which has a dual tarball also.
>>
>> Fixes this WARNING:
>> WARNING: /srv/hdd/intel/test/tmp/work/corei7-64-poky-linux/lms7/7.1.20-r0/lms-7.1.20 ('S') doesn't exist, please set 'S' to a proper value
>>
>> [YOCTO #7551]
>>
>> Signed-off-by: Saul Wold <sgw at linux.intel.com>
>> ---
>>   common/recipes-bsp/amt/lms7_7.1.20.bb | 22 ++++++++++++++++++----
>>   1 file changed, 18 insertions(+), 4 deletions(-)
>>
>> diff --git a/common/recipes-bsp/amt/lms7_7.1.20.bb b/common/recipes-bsp/amt/lms7_7.1.20.bb
>> index acc08c1..c2ab955 100644
>> --- a/common/recipes-bsp/amt/lms7_7.1.20.bb
>> +++ b/common/recipes-bsp/amt/lms7_7.1.20.bb
>> @@ -12,8 +12,12 @@ SRC_URI = "http://software.intel.com/sites/default/files/m/4/e/a/9/b/37962-${BPN
>>              file://atnetworktool-printf-fix.patch \
>>              file://readlink-declaration.patch"
>>
>> +LOCALSRC = "file://${WORKDIR}/outputdir/${BPN}-${PV}-${PV_SUB}.tar.gz"
>> +
>>   COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
>>
>> +
>> +
>
> This appears to be whitespace noise added, not a huge deal, but
> something to be mindful of.
>
>>   LIC_FILES_CHKSUM = "file://COPYING;md5=7264184cf88d9f27b719a9656255b47b"
>>
>>   SRC_URI[md5sum] = "687b76e78bfdbcf567c0e842c1fe240a"
>> @@ -24,12 +28,22 @@ inherit autotools update-rc.d
>>   INITSCRIPT_NAME = "lms7"
>>   INITSCRIPT_PARAMS = "defaults"
>>
>> -do_unpack2() {
>> -	cd ${WORKDIR}
>> -	tar -xvzf ${WORKDIR}/outputdir/${BPN}-${PV}-${PV_SUB}.tar.gz
>> +python do_unpack() {
>> +    s = d.getVar('S', True)
>> +    d.setVar('S', '${WORKDIR}/outputdir')
>> +
>> +    bb.warn ("Unpacking with S = %s" % d.getVar('S', True))
>
> WARN is generally reserved for unexpected or potentially problematic
> situations. In this case it's behaving as expected, so .info() would
> appear to be a more appropriate test. Anytime I see a warn I would
> expect something needs to be fixed - and this will warn twice everytime
> under normal operation. Correct?
>
Doh, debug messages left in!  I will regenerate it right now, sorry 
about that.

I will fix the white space issue also.

Sau!

>> +    bb.build.exec_func('base_do_unpack', d)
>> +
>> +    # temorarily change SRC_URI for unpack
>> +    src_uri = d.getVar('SRC_URI')
>> +    d.setVar('SRC_URI', '${LOCALSRC}')
>> +    d.setVar('S', s)
>> +    bb.warn ("Unpacking2 with S = %s" % d.getVar('S', True))
>> +    bb.build.exec_func('base_do_unpack', d)
>> +    d.setVar('SRC_URI', src_uri)
>>   }
>>
>> -addtask unpack2 after do_unpack before do_patch
>>
>>   do_install_append () {
>>   	mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms7
>>
>


More information about the meta-intel mailing list