[OE-core] [RFC][v2] [PATCH 1/1] package-index.bb: add support for deb and rpm.

Cui, Dexuan dexuan.cui at intel.com
Fri May 13 23:17:51 UTC 2011


Saul Wold wrote:
> On 05/13/2011 02:53 AM, Dexuan Cui wrote:
>> From: Dexuan Cui<dexuan.cui at intel.com>
>> 
>> diff --git a/meta/classes/package_deb.bbclass
>> b/meta/classes/package_deb.bbclass 
>> index 4faeb4a..4cc0b69 100644
>> --- a/meta/classes/package_deb.bbclass
>> +++ b/meta/classes/package_deb.bbclass
>> @@ -431,3 +431,12 @@ python do_package_write_deb () {
>>   do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
>>   addtask package_write_deb before do_package_write after do_package
>> 
>> +
>> +do_package_index[depends] += "dpkg-native:do_populate_sysroot
>> apt-native:do_populate_sysroot" +do_package_index[recrdeptask] +=
>> "package_update_index_deb" + +do_package_index() {
>> +   set -ex
>> +   package_update_index_deb
>> +   set +ex
>> +}
> 
> Why do you continue to include the do_package_index here, it's no
> longer needed with the setting of do_package_index[recrdeptask], this
> is true below also.
Sorry, I didn't use the recrdeptask flag and I guess I still don't quite understand it.

Here removing the do_package_index() I will get such an ERROR:
ERROR: Task do_package_index from /distro/dcui/pc1/meta/recipes-core/meta/package-index.bb seems to be empty?!##########################                   | ETA:  00:00:00
ERROR: Error parsing /distro/dcui/pc1/meta/recipes-core/meta/package-index.bb: md5() argument 1 must be string or read-only buffer, not None               | ETA:  00:00:00

About the recrdeptask  flag: "These are specified with the 'recrdeptask' flag and is used signify the task(s) of each RDEPENDS which must have completed before that task can be executed. It applies recursively so also, the RDEPENDS of each item in the original RDEPENDS must be met and so on. It also runs all DEPENDS first too".
I even added RDEPENDS += " package-index" in package-index.bb, but no change.

I'm trying to figure this out. Please point out my issue once this is obvious to you. :-)

BTW: using the recrdeptask method, we have no chance to do "set -ex" and as a result we lose some debug info in the log file. Is this ok?

>> +
>> diff --git a/meta/classes/package_rpm.bbclass
>> b/meta/classes/package_rpm.bbclass 
>> index 70170d1..d9470d6 100644
>> --- a/meta/classes/package_rpm.bbclass
>> +++ b/meta/classes/package_rpm.bbclass
>> @@ -814,3 +814,10 @@ python do_package_write_rpm () {
>>   do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
>>   addtask package_write_rpm before do_package_write after do_package
>> 
>> +do_package_index[depends] +=
>> "createrepo-native:do_populate_sysroot" +do_package_index() { +   
>> set -ex +    package_update_index_rpm
>> +    createrepo "${DEPLOY_DIR_RPM}"
>> +    set +ex
>> +}
> 
> Nor this do_package_index() function, why no
> do_package_index[recrdeptask] setting in RPM?  If you need a special
> function here them call it do_package_index_rpm() and set the
> do_package_index[recrdeptask] to that function.
Yes, I should have added a new function including package_update_index_rpm and  createrepo "${DEPLOY_DIR_RPM}". and set do_package_index[recrdeptask] to it. 

Thanks,
-- Dexuan




More information about the Openembedded-core mailing list