Skip to contentSkip to conversation

librsvg: remove redundant assignment

PATCH New Ross Burton 1 participant 2 messages Oct 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 librsvg: remove redundant assignment

PIXBUFCACHE_SYSROOT_DEPS was removed in oe-core b41108, so remove this assignment to avoid confusing people reading the recipe.

---
 meta/recipes-gnome/librsvg/librsvg_2.40.16.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-gnome/librsvg/librsvg_2.40.16.bb +0 -2
index ed54d9d..49243c8 100644
@@ -41,5 +41,3 @@ FILES_rsvg = "${bindir}/rsvg* \
 FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
 
 PIXBUF_PACKAGES = "librsvg-gtk"
-
-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 pixbufcache: handle gdk-pixbuf not being present

It's possible - albeit unlikely - that gdk-pixbuf isn't present in the sysroot when a recipe inheriting this class is and the sysroot is finalised.

One example would be if the sstate archive has librsvg but not gdk-pixbuf:
librsvg will be extracted from the sstate but gdk-pixbuf will be built to "fill in the gap". In this situation the setscene completion hook installed by pixbufcache.bbclass will attempt to execute gdk-pixbuf-query-loaders, but that binary hasn't been installed by gdk-pixbuf yet.

Also add gdk-pixbuf-native to DEPENDS in native builds to ensure that the binaries we expect will be present, as it's possible to build loaders without linking to GdkPixbuf.

[ YOCTO #10420 ]

---
 meta/classes/pixbufcache.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/pixbufcache.bbclass +2 -2
index dbe11e1..b619a77 100644
@@ -54,6 +54,7 @@ gdkpixbuf_complete() {
 # An error exit during populate_sysroot_setscene allows bitbake to
 # try to recover by re-building the package.
 #
+DEPENDS_append_class-native = " gdk-pixbuf-native"
 SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
 
 # See base.bbclass for the other half of this
@@ -61,7 +62,6 @@ pixbufcache_sstate_postinst() {
 	if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
 		${gdkpixbuf_complete}
 	elif [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
-		echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions
+		test -x ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders && echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions
 	fi
 }
-
Signature · 1 line
2.8.1