From patchwork Mon Mar 5 11:01:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 130626 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2547726lja; Mon, 5 Mar 2018 03:02:07 -0800 (PST) X-Google-Smtp-Source: AG47ELshmBd/mz/F0LRzER+9tDukv2pjVHnxf5ngxIV3TIcVsyxa0KNGaJsNPFZme6Hm9liUy4FL X-Received: by 2002:a17:902:b192:: with SMTP id s18-v6mr12676807plr.243.1520247727545; Mon, 05 Mar 2018 03:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520247727; cv=none; d=google.com; s=arc-20160816; b=oXGZ+yJJdbp0Q565lk/Wr870AIt1pqnLkFn/nI340lsRGucBakPJJiBKqb6U0b9Gya ulDd4YSNEEwN8Hsgz39yLc6N1qOpbHFFJ0EhQzyFmI8wk8FOZ54LzsqxgUMX9XAtL6ru iudNqIhJxelayofzWZOll7OzYZ7rY7acG4UiSb3xevrkV+eUgpBEZKrnniob1ZcWT+tU dKSiW+HQahTRWayZ3vR9VmQ49suHXNZsQn9sVwAwYW+Zh6TWxoLYvraGS0JkwY2TKses RcNdR81cAZa6YsRbbDoto9mNIc/0rpgVIQ2W1ZX1IbdrgvRNBKw57IJAN7z/xO2i6RzM cYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=kJcN5hHqaLs7UsKbEY2Lx24TC1lMjD3c9f6bliMY/ek=; b=azs2t1w1ho505kU/dgQBSSVggINtuD+IMfjj1lbh5bgscN/45Fw/I88YopACh1Kxld WEHbTEi9HAZPt+jblAMeQvWrM4/eLBsSS0dUT4CoKMiKalbNvvJf358Q3tn5ZajJbzPv gsjWUTFxHtH5/Vf8OCdjq1xS56QYLRcvuauQH2ub8V1yy+ehq808ZH8MZJ3854rHeZvr d6C597ZoDI3ovpQVTL+5drFQ2GG/JU9sD0UavtRZIAkeCiJmW6FfztzQSdbFYXCmIw/F AccLyGh4cgNCk27xojCAwbYhQHUla9jcLZsnqGDHVhuvGUmaNjYLqLwZz49EM65yBK0F SoiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=j1YtlLzY; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id a11-v6si3370895plp.363.2018.03.05.03.02.07; Mon, 05 Mar 2018 03:02:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=j1YtlLzY; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0804478A92; Mon, 5 Mar 2018 11:02:03 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by mail.openembedded.org (Postfix) with ESMTP id B34DB78A6F for ; Mon, 5 Mar 2018 11:02:02 +0000 (UTC) Received: by mail-wr0-f177.google.com with SMTP id f14so16759498wre.8 for ; Mon, 05 Mar 2018 03:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=B7mhhfys3sr2L542YIwm6NiJvuL3JbokzeUhKRnFGxI=; b=j1YtlLzYLj1IlEVOLwDJOtLK8ceUarposvhFJcgernzlIXtnpxKUuMDsrvLtRL6o80 rGIYi8++EMptNXCxu0oNgoAdYkXogoxiJr5ZMWKsKDJxKRJ4tKdyRNGhjvDSZNh8QoNY ye6i/LAf2p0p5AflG6D6uW7Yllb6f0yEANL/x1/Unhhw/Nt1u6qoSVTDDKiSXlZLl6ob +m+JPvnRBJWJICd/z7FifnnmaWuVL2GDjar8ku+u9eLolWjHjKGnflL8SJjyWR1nikdI MXNYbni2syum1xCQbCmVByBbfUmxAUqk2W0gzdy+xA24GT1DqIkXS1IXX9Vk/lyk5qeu /0sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=B7mhhfys3sr2L542YIwm6NiJvuL3JbokzeUhKRnFGxI=; b=eETtgd4vc4TAJBs35A6D1ivrPvetLrwkMZ1Cr929sC5ycyrxzWFqNGk78twqy04/cf mjAnbr6DZJeIid6PIwPVfh5gx8xR8CAoOJ6ZaDlBYp1Mn5PiXQ7q0AK4lv8FFlPMal/A m8qFiIMk0dcUIfNYrMwwTChbtLu8kWK0F+R6j9sCAPhtkmVcPhBwtudAex6cW2DrIHZ/ V5qkf0Q3Q8icdEoVadG54ScWei0DZt89Eik+1cBfIoRmvFI1pvdXzgkq0lRJkJlaPwkC uDKbY0GoPMM37vIjRKqp45Ns2KM+ucn38ITrD9Pnx7SY4vux0ETzR2bbPRTAruz4WWq0 5wfQ== X-Gm-Message-State: APf1xPCirDGYHpT9yjaYDujEYYdotXexv4qswMZlYGMGAiqMNgaWf0rA 019e6JyI8Vr+LmeE1q4Bxqx8sb2x X-Received: by 10.223.176.228 with SMTP id j33mr11554188wra.67.1520247722856; Mon, 05 Mar 2018 03:02:02 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o9sm13042874wrf.43.2018.03.05.03.02.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 03:02:01 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 5 Mar 2018 11:01:55 +0000 Message-Id: <20180305110158.10308-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/4] xcb-proto: solve python cache colliion 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: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Because I didn't really want python3-native to be at the bottom of the entire X11 stack this recipe jumps through a small hoop to use the host Python to run some modules it installs into the sysroot. The Makefile compiles the Python module, which is good as the cache file is recorded in the sstate manifest so when the package is removed from the sysroot all of it is removed. However in an enviroment where the sstate is shared between multiple hosts it is possible that a different Python is used and this will generate a new cache when the code is executed, which is not recorded in the manifest. Eventually you'll end up with ownerless cache files in a sysroot which conflict with the same file coming from a sstate upgrade. Solve this with a SSTATE_INST_POSTRM which is ran when sstate is removed to ensure that there are no Python cache files left behind. [ YOCTO #11809 ] Signed-off-by: Ross Burton --- meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb index 712ab6c59ab..25a8373e0b9 100644 --- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb +++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb @@ -34,3 +34,20 @@ RDEPENDS_${PN}-dev = "" RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" BBCLASSEXTEND = "native nativesdk" + +# Need to do this dance because we're forcing the use of host Python above and +# if xcb-proto is built with Py3.5 and then re-used from sstate on a host with +# Py3.6 the second build will write new cache files into the sysroot which won't +# be listed in the manifest so won't be deleted, resulting in an error on +# rebuilds. Solve this by deleting the entire cache directory when this package +# is removed from the sysroot. +SSTATEPOSTINSTFUNCS += "xcb_sstate_postinst" +xcb_sstate_postinst() { + if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] + then + cat <${SSTATE_INST_POSTRM} +#!/bin/sh +rm -rf ${libdir}/xcb-proto/xcbgen/__pycache__ +EOF + fi +}