From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kmu-office.ch (mail.kmu-office.ch [178.209.48.109]) by mail.openembedded.org (Postfix) with ESMTP id 66C5A79B57 for ; Sun, 3 Mar 2019 10:31:06 +0000 (UTC) Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 8BC955C1C19; Sun, 3 Mar 2019 11:31:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1551609066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6JOyS2ZTHa7AwzdHBTqnODY2rxm1lPJYYrOCWSdXLRI=; b=fox/3QwMOoidX5Ctbi9b1BaiCxMhcbK+KaEApe4rL+lf2peMY0fcgvc0O4pP7w4GYYkbq0 4r7swOobyt2elVR+Z1vpeBN0DPCST/N1x7fTOnIRaWQKhkP4aYHhYzA5AGINBgubuWdvHn dayvww/MYTC2KPqCBAXamY0Dhuq7ppg= MIME-Version: 1.0 Date: Sun, 03 Mar 2019 11:31:06 +0100 From: Stefan Agner To: liu.ming50@gmail.com In-Reply-To: <1551604121-5034-1-git-send-email-liu.ming50@gmail.com> References: <1551604121-5034-1-git-send-email-liu.ming50@gmail.com> Message-ID: X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.7 Cc: stefan.agner@toradex.com, luka.pivk@toradex.com, openembedded-core@lists.openembedded.org Subject: Re: [PATCH] gdk-pixbuf: export XDG_DATA_DIRS in wrappers X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 10:31:06 -0000 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On 03.03.2019 10:08, liu.ming50@gmail.com wrote: > From: Ming Liu > > We need export XDG_DATA_DIRS to be ${STAGING_DATADIR} for gdk-pixbuf* > wrappers or else they will try to load mime from /usr/share/mime of the > host machine. This fixes a build issue I have seen on a Ubuntu 18.04 machine when building psplash with a custom png splash screen. ERROR: psplash-0.1+gitAUTOINC+2015f7073e-r15 do_compile: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: 0001: *** 0002:do_compile(d) 0003: File: '/workdir/oe/build/conf/../../layers/meta-toradex-torizon/recipes-core/psplash/psplash_git.bbappend', lineno: 34, function: do_compile 0030: for localfile, outputfile in zip(localfiles, outputfiles): 0031: if localfile.endswith(".png"): 0032: subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir) 0033: fbase = os.path.splitext(localfile)[0] *** 0034: shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile) 0035: else: 0036: shutil.copyfile(os.path.join(workdir, localfile), destfile) 0037: # For some reason just updating the header is not enough, we have to touch the .c 0038: # file in order to get it to rebuild File: '/usr/lib/python3.6/shutil.py', lineno: 120, function: copyfile 0116: 0117: if not follow_symlinks and os.path.islink(src): 0118: os.symlink(os.readlink(src), dst) 0119: else: *** 0120: with open(src, 'rb') as fsrc: 0121: with open(dst, 'wb') as fdst: 0122: copyfileobj(fsrc, fdst) 0123: return dst 0124: Exception: FileNotFoundError: [Errno 2] No such file or directory: '/workdir/oe/tmp/work/cortexa7t2hf-neon-torizon-linux-gnueabi/psplash/0.1+gitAUTOINC+2015f7073e-r15/torizon-blue-img.h' Note that the error is somewhat misleading since the real problem happened in the convert script, where the header did not get created due to gdk-pixbuf-csource not recognizing the png file (Couldn't recognize the image file format for file ..). This patch fixes the problem! Tested-by: Stefan Agner Thanks Ming for looking into this! -- Stefan > > Signed-off-by: Ming Liu > --- > meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb > b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb > index 3a544bd..a5bd7c6 100644 > --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb > +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb > @@ -112,19 +112,24 @@ do_install_append_class-native() { > find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; > > create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ > + XDG_DATA_DIRS=${STAGING_DATADIR} \ > > GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache > > create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ > + XDG_DATA_DIRS=${STAGING_DATADIR} \ > > GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache > > create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ > + XDG_DATA_DIRS=${STAGING_DATADIR} \ > > GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache > > create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ > + XDG_DATA_DIRS=${STAGING_DATADIR} \ > > GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache > \ > GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders > > create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ > + XDG_DATA_DIRS=${STAGING_DATADIR} \ > > GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache > \ > GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders > } > -- > 2.7.4