[1/3] shared-mime-info: package runtime data separately

Submitted by Joshua Lock on Nov. 9, 2011, 12:53 a.m.

Details

Message ID 552def63eb1b587a3f0685c7e604ab1b9a1ac7e5.1320799787.git.josh@linux.intel.com
State Accepted
Commit 07ee2d7e6b2f571fe405464838e376cf03e5e8e6
Headers show

Commit Message

Joshua Lock Nov. 9, 2011, 12:53 a.m.
The freedesktop.org.xml is required when updating the mime database but
otherwise not much use. Therefore package it separately, rather than
removing it completely, so that it can be used as required for on-device
updates without adding almost 2MB to every image which hase shared-mime-info.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 .../shared-mime-info/shared-mime-info.inc          |    9 ++++++---
 .../shared-mime-info/shared-mime-info_0.91.bb      |    2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
index c8cab29..57e829c 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -17,13 +17,16 @@  EXTRA_OECONF = "--disable-update-mimedb"
 FILES_${PN} += "${datadir}/mime"
 FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
 
+# freedesktop.org.xml is only required when updating the mime database,
+# package it separately
+PACKAGES += "shared-mime-info-data"
+FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
+RDEPENDS_shared-mime-info-data = "shared-mime-info"
+
 do_install () {
 	autotools_do_install
 
 	update-mime-database ${D}${datadir}/mime
-
-	# we do not need it on device and it is huge
-	rm ${D}${datadir}/mime/packages/freedesktop.org.xml
 }
 
 do_install_virtclass-native () {
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
index 0c3b01c..bc4a8f7 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
@@ -1,5 +1,5 @@ 
 require shared-mime-info.inc
-PR = "r1"
+PR = "r2"
 
 SRC_URI[md5sum] = "982a211560ba4c47dc791ccff34e8fbc"
 SRC_URI[sha256sum] = "98cfebe1d809afb24934e634373821e2a1dfa86fc6462cab230589a1c80988bd"

Comments

Rainer Koenig Nov. 18, 2011, 12:20 p.m.
Am 09.11.2011 01:53, schrieb Joshua Lock:
> The freedesktop.org.xml is required when updating the mime database but
> otherwise not much use. Therefore package it separately, rather than
> removing it completely, so that it can be used as required for on-device
> updates without adding almost 2MB to every image which hase shared-mime-info.

somehow this patch breaks the image creation for systemd-gnome-image.
Famous last words from bitbake:

--------------8<-snip-----------------
| Collected errors:
|  * satisfy_dependencies_for: Cannot satisfy the following dependencies
for task-gnome:
|  *    shared-mime-info-data *         shared-mime-info-data *
|  * opkg_install_cmd: Cannot install package task-gnome.
| ERROR: Function 'do_rootfs' failed (see
/srv/oe/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/dm814x_evm-angstrom-linux-gnueabi/systemd-gnome-image-1.0-r0/temp/log.do_rootfs.6501
for further information)
NOTE: package systemd-gnome-image-1.0-r0: task do_rootfs: Failed
ERROR: Task 8
(/srv/oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom/systemd-gnome-image.bb,
do_rootfs) failed with exit code '1'
ERROR:
'/srv/oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom/systemd-gnome-image.bb'
failed
--------------8<-snip-----------------

And there is no package names shared-mime-info-data*. :-(


> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
>  .../shared-mime-info/shared-mime-info.inc          |    9 ++++++---
>  .../shared-mime-info/shared-mime-info_0.91.bb      |    2 +-
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
> index c8cab29..57e829c 100644
> --- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
> +++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
> @@ -17,13 +17,16 @@ EXTRA_OECONF = "--disable-update-mimedb"
>  FILES_${PN} += "${datadir}/mime"
>  FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
>  
> +# freedesktop.org.xml is only required when updating the mime database,
> +# package it separately
> +PACKAGES += "shared-mime-info-data"
> +FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
> +RDEPENDS_shared-mime-info-data = "shared-mime-info"
> +
>  do_install () {
>  	autotools_do_install
>  
>  	update-mime-database ${D}${datadir}/mime
> -
> -	# we do not need it on device and it is huge
> -	rm ${D}${datadir}/mime/packages/freedesktop.org.xml
>  }
>  
>  do_install_virtclass-native () {
> diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
> index 0c3b01c..bc4a8f7 100644
> --- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
> +++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
> @@ -1,5 +1,5 @@
>  require shared-mime-info.inc
> -PR = "r1"
> +PR = "r2"
>  
>  SRC_URI[md5sum] = "982a211560ba4c47dc791ccff34e8fbc"
>  SRC_URI[sha256sum] = "98cfebe1d809afb24934e634373821e2a1dfa86fc6462cab230589a1c80988bd"

Regards
Rainer
Khem Raj Nov. 23, 2011, 9:45 p.m.
On Fri, Nov 18, 2011 at 4:20 AM, Rainer Koenig
<Rainer.Koenig@ts.fujitsu.com> wrote:
> Am 09.11.2011 01:53, schrieb Joshua Lock:
>> The freedesktop.org.xml is required when updating the mime database but
>> otherwise not much use. Therefore package it separately, rather than
>> removing it completely, so that it can be used as required for on-device
>> updates without adding almost 2MB to every image which hase shared-mime-info.
>
> somehow this patch breaks the image creation for systemd-gnome-image.
> Famous last words from bitbake:

Did you do a clean build ? if not try that

>
> --------------8<-snip-----------------
> | Collected errors:
> |  * satisfy_dependencies_for: Cannot satisfy the following dependencies
> for task-gnome:
> |  *    shared-mime-info-data *         shared-mime-info-data *
> |  * opkg_install_cmd: Cannot install package task-gnome.
> | ERROR: Function 'do_rootfs' failed (see
> /srv/oe/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/dm814x_evm-angstrom-linux-gnueabi/systemd-gnome-image-1.0-r0/temp/log.do_rootfs.6501
> for further information)
> NOTE: package systemd-gnome-image-1.0-r0: task do_rootfs: Failed
> ERROR: Task 8
> (/srv/oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom/systemd-gnome-image.bb,
> do_rootfs) failed with exit code '1'
> ERROR:
> '/srv/oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom/systemd-gnome-image.bb'
> failed
> --------------8<-snip-----------------
>
> And there is no package names shared-mime-info-data*. :-(
>
>
>> Signed-off-by: Joshua Lock <josh@linux.intel.com>
>> ---
>>  .../shared-mime-info/shared-mime-info.inc          |    9 ++++++---
>>  .../shared-mime-info/shared-mime-info_0.91.bb      |    2 +-
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
>> index c8cab29..57e829c 100644
>> --- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
>> +++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
>> @@ -17,13 +17,16 @@ EXTRA_OECONF = "--disable-update-mimedb"
>>  FILES_${PN} += "${datadir}/mime"
>>  FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
>>
>> +# freedesktop.org.xml is only required when updating the mime database,
>> +# package it separately
>> +PACKAGES += "shared-mime-info-data"
>> +FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
>> +RDEPENDS_shared-mime-info-data = "shared-mime-info"
>> +
>>  do_install () {
>>       autotools_do_install
>>
>>       update-mime-database ${D}${datadir}/mime
>> -
>> -     # we do not need it on device and it is huge
>> -     rm ${D}${datadir}/mime/packages/freedesktop.org.xml
>>  }
>>
>>  do_install_virtclass-native () {
>> diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
>> index 0c3b01c..bc4a8f7 100644
>> --- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
>> +++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
>> @@ -1,5 +1,5 @@
>>  require shared-mime-info.inc
>> -PR = "r1"
>> +PR = "r2"
>>
>>  SRC_URI[md5sum] = "982a211560ba4c47dc791ccff34e8fbc"
>>  SRC_URI[sha256sum] = "98cfebe1d809afb24934e634373821e2a1dfa86fc6462cab230589a1c80988bd"
>
> Regards
> Rainer
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Koen Kooi Nov. 23, 2011, 9:59 p.m.
Op 23 nov. 2011, om 22:45 heeft Khem Raj het volgende geschreven:

> On Fri, Nov 18, 2011 at 4:20 AM, Rainer Koenig
> <Rainer.Koenig@ts.fujitsu.com> wrote:
>> Am 09.11.2011 01:53, schrieb Joshua Lock:
>>> The freedesktop.org.xml is required when updating the mime database but
>>> otherwise not much use. Therefore package it separately, rather than
>>> removing it completely, so that it can be used as required for on-device
>>> updates without adding almost 2MB to every image which hase shared-mime-info.
>> 
>> somehow this patch breaks the image creation for systemd-gnome-image.
>> Famous last words from bitbake:
> 
> Did you do a clean build ? if not try that

http://cgit.openembedded.org/openembedded-core/commit/?id=79ee0f8c849cd5de16b6ae1b3dd6c43bbad472b2