From: Martin Jansa Date: Wed, 13 Jan 2010 12:05:07 +0000 (+0100) Subject: gpe-icons: cleanup include file a bit, don't inherit update-alternatives, just do... X-Git-Tag: Release-2010-05/1~894 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbd7025530add28ba6203ae011c41ee5bb2ccace;p=openembedded.git gpe-icons: cleanup include file a bit, don't inherit update-alternatives, just do it in postins/prerm with distro override Signed-off-by: Martin Jansa --- diff --git a/recipes/gpe-icons/gpe-icons.inc b/recipes/gpe-icons/gpe-icons.inc index 18dd39bd04..fca142a4d7 100644 --- a/recipes/gpe-icons/gpe-icons.inc +++ b/recipes/gpe-icons/gpe-icons.inc @@ -1,17 +1,23 @@ SECTION = "gpe" RDEPENDS += "gdk-pixbuf-loader-png" -INHERIT = "gpe" -INHERIT_shr = "gpe update-alternatives" -inherit ${INHERIT} +#only icons present in the package +PACKAGE_ARCH = "all" -INC_PR = "r4" +INC_PR = "r5" ALTERNATIVE_NAME = "gpe-pixmaps" ALTERNATIVE_LINK = "${datadir}/gpe/pixmaps" ALTERNATIVE_PATH = "${datadir}/gpe/pixmaps.${PN}" ALTERNATIVE_PRIORITY ?= 1 +# copy icons from other alternatives if they are not provided by current alternative +# ie gpe-sketchbook install own icon to pixmaps dir even before gpe-icons_*.bb is installed +# so if we switch pixmaps link to neo theme, there would be no icon for gpe-sketchbook +# unless we copy it to neo theme in postinst too +# inherit update-alternatives is not used, because not all distributions want to use it +# and conditional inherit is a bit difficult to use (inherit ${GPE_INHERIT} works, but only if we always want at least 1 bbclass) + pkg_postinst_shr() { if [[ -e ${ALTERNATIVE_LINK} && ! -h ${ALTERNATIVE_LINK} ]] ; then echo "warn: ${ALTERNATIVE_LINK} exists and it's not a link!" @@ -35,4 +41,9 @@ pkg_postinst_shr() { fi; done done + update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY} +} + +pkg_postrm_shr() { + update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} } diff --git a/recipes/gpe-icons/gpe-icons_0.25.bb b/recipes/gpe-icons/gpe-icons_0.25.bb index 7070e12c2b..14f7f26fb7 100644 --- a/recipes/gpe-icons/gpe-icons_0.25.bb +++ b/recipes/gpe-icons/gpe-icons_0.25.bb @@ -1,13 +1,10 @@ DESCRIPTION = "Common icons for GPE" LICENSE = "GPL" -SECTION = "gpe" - -RDEPENDS = "gdk-pixbuf-loader-png" PR = "${INC_PR}.0" -#only icons present in the package -PACKAGE_ARCH = "all" +inherit gpe + FILES_${PN} = "${datadir}/gpe" #Only SHR is using u-a for gpe-icons diff --git a/recipes/gpe-icons/gpe-theme-neo_git.bb b/recipes/gpe-icons/gpe-theme-neo_git.bb index 3f0f7b1c7c..402eef6ea8 100644 --- a/recipes/gpe-icons/gpe-theme-neo_git.bb +++ b/recipes/gpe-icons/gpe-theme-neo_git.bb @@ -1,8 +1,7 @@ DESCRIPTION = "nEo GPE theme - a very fast, high contrast GPE theme" -SECTION = "gpe" HOMEPAGE = "http://jmccloud.jm.funpic.de" AUTHOR = "Jesus McCloud