From patchwork Mon Dec 9 12:20:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 181021 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4273220ile; Mon, 9 Dec 2019 04:20:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyesM31SL0UMqXfBr74J8sPc0Y9z9OWapgkYs03QkFPDud2XpdLXKuQixxzGHszmTCIu3FV X-Received: by 2002:a63:c804:: with SMTP id z4mr18547870pgg.440.1575894039078; Mon, 09 Dec 2019 04:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575894039; cv=none; d=google.com; s=arc-20160816; b=drzTp7rR4bfYhjHjt942bYN/ffOPoYC3Wft7aDFthJ8giuCTXWDWLQYK5gLY88VlmO vZVLj6OnDwgEhIv0CZWqZZzkZdhuEVIM/TTAMirj70L2O56vOPuKWwYmCye0MSsX1nVV PZ4qn1qH8qr6z+A/hFJPBPIaGjUtfR3wzHbhSP2PDZGcWQGExunc+/IZFgdUIBkDiGK0 3OsUhd5gJQDdJB1zLOl2iAgJ1IsQiDyBY2ewH9lUt5KfykLq93r+ljeDNBp00sm08kNo eh8f3GfZBzk2b94noGmdAWeRkBGODB1mhUQq8K8VYE4VqrbRw/QjPG4w+WgQ1ykOSlGb Odag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=HiapSO905gRtUJGDGOF4OADmBp7ieUTM1SBO1m2tJJE=; b=FtPt71Ov6toqdValFrjHNSU+DoiqKG5K/MmOZJyc44K9nXjPgfIhJxjrNgvMn7mpP8 yHsbYraTjlAjuQYZANlXR+mFeKfrMxN7Dwak88I7raDYlm8pe4dA9zBLy+vyDbjqV3yU t0unLAQtBOYEvkjbV+cENiPFFsTO1GleJxdj+mG5mZtqNl0kdtrZU+3abIaXZQnsY8kd HCsXHypCXlSynmlpkgH47oWX/p4yF+RBEBNdwEIz6/SGCMsvH+NliaIMp+RLpUyjCqhB zAaQy+EkFH5AZ2lFcvI14cxJKLW3WSiTEnY0JOGHBNqRj4cQkFOdTqkBXKAHvQ1LAjVw Y0HA== 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=lrS7opwQ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id z2si17724772pfz.216.2019.12.09.04.20.38; Mon, 09 Dec 2019 04:20:39 -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=lrS7opwQ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B9A297FCFF; Mon, 9 Dec 2019 12:20:30 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id 3599D7FCF8 for ; Mon, 9 Dec 2019 12:20:16 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id y11so15934687wrt.6 for ; Mon, 09 Dec 2019 04:20:17 -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:in-reply-to:references:mime-version :content-transfer-encoding; bh=wXIVAr+2zHiVRflmDHtLui+FNJ2q9zVFt0jOnRYziVE=; b=lrS7opwQHtHwg2vE14/9+2iSeesdfWBt92Gnh9Qh2SOTy69L9oCWKZPafyAdKjhFUn QNkRZ4I3ivrMNUNFOoFhJ2DbfVactnGRggdG54JbW9h79gsCm+/Q3hcwBl2o3q6jPRV1 hV40TJgwXkP8get5ci8Rz2hFvQEfvNSmIrsk6zQfL/9wMdasY5E/4Pw5FaAooloAbbmn GpKZMscS7LOm3XdL3g2Hwn6cAd42l6Qceq5VIpENWgtowrz+9FLuDpG6+mD4ampMEDqr KnyrMsih+uGDqBDQ5hRLZAOrAlsbmnfHg5isOGEZPASounhMU3EIopLAKZL55BJ/zbqo aQFA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=wXIVAr+2zHiVRflmDHtLui+FNJ2q9zVFt0jOnRYziVE=; b=TpWD8qHm9e8PrR6N/JdKwHzStoN4leQFZ/au8x55ziRtmd7qbGMLPBAVtud8YvFJ3y GYhJ0MoMR0u/gRsNE+VGjG26akrA1ADip2Ps6GIQEE+6nOjCdNCaQ7c5IAWFZE97IFwf vlkfEBfUz0vOwX8ToxNoCDTJi1fbgxfFAyvlVUYWk1j6nflwtnPC4DYtPLcoK/uXupRv Qb7Sh+n4VQ0BJXv23dhhsB4dGWcP94DffRkrjfWIHSSXvkY736mQfLrKc2n1TwgMUCcq kxf6dA081ZXK8/wCRh/cvM8forIySph8RX/Iam58SnjdriqPIMRquD0DEqwHis1Uu0mg GKgg== X-Gm-Message-State: APjAAAW8KQfv+1YbtDNR2fSWZY9+ukgOc9VfY7iQhrzWiLm1xeza1SsZ oTWso3Hrp+wT1mlmzY+lPZq63RZXsf0= X-Received: by 2002:adf:82f3:: with SMTP id 106mr1920438wrc.69.1575894016717; Mon, 09 Dec 2019 04:20:16 -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 a3sm14611177wmh.5.2019.12.09.04.20.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 04:20:16 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 9 Dec 2019 12:20:06 +0000 Message-Id: <20191209122007.13306-3-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191209122007.13306-1-ross.burton@intel.com> References: <20191209122007.13306-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/4] rootfs: don't use oe.cachedpath 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: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Unless cachedpath is used correctly then it's just a glorified clone of os.walk, but without any of the recent optimisations in os.walk. In this codepath there is no point to using cachedpath. Signed-off-by: Ross Burton --- meta/lib/oe/rootfs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index c62fa5f54ad..cd65e620300 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -126,17 +126,16 @@ class Rootfs(object, metaclass=ABCMeta): bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(dir)) shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir, symlinks=True) - cpath = oe.cachedpath.CachedPath() # Copy files located in /usr/lib/debug or /usr/src/debug for dir in ["/usr/lib/debug", "/usr/src/debug"]: src = self.image_rootfs + '-orig' + dir - if cpath.exists(src): + if os.path.exists(src): dst = self.image_rootfs + dir bb.utils.mkdirhier(os.path.dirname(dst)) shutil.copytree(src, dst) # Copy files with suffix '.debug' or located in '.debug' dir. - for root, dirs, files in cpath.walk(self.image_rootfs + '-orig'): + for root, dirs, files in os.walk(self.image_rootfs + '-orig'): relative_dir = root[len(self.image_rootfs + '-orig'):] for f in files: if f.endswith('.debug') or '/.debug' in relative_dir: