From patchwork Tue Nov 24 22:02:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 195 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp150542oou; Wed, 25 Nov 2020 00:03:42 -0800 (PST) X-Received: by 2002:a25:d494:: with SMTP id m142mr3172201ybf.16.1606291422565; Wed, 25 Nov 2020 00:03:42 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606291422; cv=pass; d=google.com; s=arc-20160816; b=sSrbkL+hri8XfgqumPUyl78RztVosLAWnGbM3kDQ6nBNM2yLDW7Ftnted3F+GetUWO YqY3RWUgfoMefYEQlOpox4DsA0CHsiSV9U1fqTHu0OOB2Ld9xuZdH4m/ctqy+CTIJ14B WUDaGtauNO1VmSHIze3Us/ggZUmjKRzSuKeCGrOgaU+mKrvKqgKITUt6iNaRGedAHWYg 95UH7ov8C6txpNefHZ2WIeYFoViTYlqKQhgkRYiTMBh2MbRHnpLZcE/1mbeD/UssHwf8 54l4XcdbnaNgV6EqnDFap0pzqonvpAV9xoimc6avulosI5QR0UNTvsB1L6CZNlfY7P3l EPww== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=CMsUV/Att4qr71QIL9da/jFQR6bI5tJsZCdNWwQ5M4s=; b=eWQ5QgCP3bFsYCMqHkztUZGLnjpBYIOPrKMhBotDdW80Z4OjEM5WbPmJ5RqP7WH3JV JSa2KdIeF0GKuEEPkuNDuDEp3u3/wWkYc4ACHIdJ32GRM6iisk/L/hWT/NHc6GdiGnDp ebVRG+zZ4v/g1mMv6O4FhTZr486yAsoegKPIZg3+FK0Y7WPF415/DBPDDgXrodARnfek X/vGnhTrLXqbTZIm8rORbIq1XSJlPwt9b+lTEXfUYsDMKp7NUHrG4vghrQ2HXtO6deHe MTF5NbkQSZ5VBhDSGK9+aGlHjIkqccfSUotE92Pou9OeK3A0hhitAjAn8oa1FYoVKZhC 76vQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=f5fPLIqI; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu77d6qkgqexbhntty@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXU77D6QKGQEXBHNTTY@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id h19sor401345ybj.193.2020.11.25.00.03.42 (Google Transport Security); Wed, 25 Nov 2020 00:03:42 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu77d6qkgqexbhntty@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=f5fPLIqI; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu77d6qkgqexbhntty@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXU77D6QKGQEXBHNTTY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606291422; cv=pass; d=google.com; s=arc-20160816; b=V0SHolH9C1VkAq/+1UAu2RrAmPsw7QaBod0ke9wuguftIREjfu2DDJcAY5XahYEfJm ldrxtRaTQoxY0JrHGKw2ppDaRkTlUtiAD/fSorsVGJel+DDKfGN6ZzB34qmNdRD2TrsJ cC6pCIW5SSiGcT8tP7WfdWcYv4VBCJOkgwaQBA1ZtwcP6xZbjSIZ24TSIU4lJ4ZzilVz 8hYbconsVgUpdNN4OmRCqKSrAoRAd9iQ2XUn/nj7iJx9eJYsIAIfr3VG72LW94pnLQdb Ahh9v2lcuMXIrnX3s4nG3FpE1I60dyUGOHiP1/NMmSrcpISSnn8ocHaMRSpKZj5zbzGX /wyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=CMsUV/Att4qr71QIL9da/jFQR6bI5tJsZCdNWwQ5M4s=; b=vRM677gGf6s78wiKHfF/wIpGxO27atPyuHOGbAPqUfdIVew36wgVD2IqvNfcZn3kc/ oaWYyJvJyGcF0mOvcgtkoBC9pZAqFZnqL4Dq426i+AR/RMDGs6rRMliD0mvwOwHPegK/ n6iKNWov7icL8gDdNtosG2QyF17b3RBQwgwRbFORgWNLqMDDmclGpxYzBuuiFJ1PSAnG AUeZcNWv5TNhgj+KSShGdd2eAYYANDBCTAlAbkaOeo5+qB7Nwq13hqdqMlnkAune4G+/ FIqYcZ8qUJlHgE/YvdaQy29C3ZlYwoG+3yhRiel1agjWIHE9uQxZQLHaWtZCyWO2KFY4 DoWQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=CMsUV/Att4qr71QIL9da/jFQR6bI5tJsZCdNWwQ5M4s=; b=f5fPLIqI7GWBq1/C4QZrxIRHFI9bi+Q5AYdjguPSfX2q0zvuQ6ZgPSy39DRzcQmuQB MDYEFWXIAPEpD5PljbA3bJihmi4Hw5A0ufw+mQTAGm609p2mZtIw2ieslzU6JCa6zRE4 HZUUmeAwPnU8u5LQmf/kP20ZEPNXl9M6UADRNCDqrgGhkNTxiAnOKL5aalHYm7HTyB2o b4JbgAYQPvX1xATDu3HKv0tjVedyfWvq9z8bj+OVRe1usGyGo1jmnz/lJUkBIiTZUFTX Cp2Z/MxqHS6ufxGSAzibo3xOxqA6PXpZx06toxsGDlv9m6EGcFLoznNQXOnHLFsjnodB PRxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=CMsUV/Att4qr71QIL9da/jFQR6bI5tJsZCdNWwQ5M4s=; b=R1V4tYUDlo3jNCJVHPXnnpvV7ag7bMM4nyzZLPv5SJ5qLZnZ3KpYumMD6Fqewnk7qP AVvL9jLoWZQ7HyePjJqUTJV3mfi6D5E9W2KClLhVDX8HNXCV+xR1m3zQBxhoWezMfHLM AGrUqdPuztLLbt7MQppuEvYYdBBsMbE3P3JYOLzXX6PAdu73cJeBytXkI9PSOhqPqn99 3OeltPDpNWUaiKuqrrmChqtcSEoWVaqHRTHo46acAiTQhblGZw4f+ZPa5cSGyMzIRluk 3Ggkrq8jmozZ84TEWk/dwHZwqZVxNn2Xb0wUBfrX1QrXZuC8OEExF16YNou6qVYA1vif uuuA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533So7X5ilBGJXaJtmuP7LV6UHmTe+uXlEbk3wRobrNl1IiIB5tc Lo+aLstQrJSNndNXj2joUwc= X-Google-Smtp-Source: ABdhPJwef7BKnQNy8L/JGYARaMpiJmYLTRUl11uNjm5qgLnvFO+G1NZjf7QdpRqjLoRGgHK+rcbuGg== X-Received: by 2002:a5b:40e:: with SMTP id m14mr2267028ybp.33.1606291422258; Wed, 25 Nov 2020 00:03:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:c553:: with SMTP id v80ls815790ybe.2.gmail; Wed, 25 Nov 2020 00:03:41 -0800 (PST) X-Received: by 2002:a25:5702:: with SMTP id l2mr2419735ybb.184.1606291421866; Wed, 25 Nov 2020 00:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606291421; cv=none; d=google.com; s=arc-20160816; b=mhcHlQsWInfuaNvE9iTj867BpVP1GBJEifoIDyeJKVsQ4XG/G3DzyBQSTD27276Cm3 bz6JUG5+5OlQhw602HWv6via48R+uHSclmcEnrs7Mejp0Ks5TMYYfMFTaTeMSRhi+LAS GcUmNsIBV/4pSPYWRZKusdJcNExIkEncSyceXmBA7NiUFIhmkwbHZGFdIYDRPlDevuaw 9jawY1zBN3iP08yX1uy67fshNKDM7jApjnCNJ96kyPOxB3J7BNwVNPCEoYBhqznAuQFj HOwFlqY3w9HObx5jiIhZrWkOvx6eerJg5HP283M7c2EDQhzdJlRDekJt0iOb4vApkEtn /Vqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=no9hSo7RZllFmyagmgiwNi3BFDjxbPTReSBDBoqfkwo=; b=IqCEZUYKZP/u6p2SnEVYDICqAPk/Fp9bNv8hfI51kpgRtmUVwBbMfH2v8Mthc32KAz 0jX7ZwIv2bVLDNKUila+sUU3IAwuQL19FGKQ6+NYSEDL1s0Mvi5xnkr4zgfQ+pEhGWX1 poapXJ7plvU/dlP/+ZTIaZ0yilmVvneJ+nYWd/RyfQO9IapEpNmm0o4xt0oMgJ8O10qY necLIVS6474xyR699M37PBlJAsldWKF+cCBFANeUoZDP1yeDaW3UPAasKuIftWCeDx+T hu0RpFINqzubquP5+yjic5lXd3e6YZwDQgo3TpJEotJ1LPOGz6ieBlmNmSvmftT12i5k HV3g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id 199si77218ybd.5.2020.11.25.00.03.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 00:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; IronPort-SDR: DdRvxUMruSzrfqMbHGd00rnEoqIk5+TvyOQGWWa0vGf2AruRzRSKLiFBKb949Od3I6WUhQhWwC ixUmxjkJKU5C4DyUbDEy90fxaBzw+63CvQ3XqrF0l5FH+x8EeGKv9iXVxNUTULR1TQQrZU2vuz u31D9tR2IF1sRsIzvtwDKmLOdaVJtk8rS3jdFPxtXMGTlj1w43LI+GVxj87/1+78/An2N0Sf7K 0a3y/DTOwGWcQI6xhkxV1WScCUMJBklFINat5Bl/tqo8NNXUMnHz5/+SAoIeVDDmWfVK15mPYJ +ck= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="57762482" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 25 Nov 2020 00:03:41 -0800 IronPort-SDR: 2F7YPlky7OpZl8tQTQngXnv5eePY0y/24DgKb7zyMfcpczaamjET6zNbHcazQDDLIguhtSkvcs X2qyKG6y5hOWByFqAQYZCpf9CWo02aPNjG980nQ9EG9xgmic/zftU6vChWP7CAO4W/pYZsegl6 Jd4rCA7QMm+ltAIQJeQtBkvI8Yk8thEcxQ9recYsQZrWTVCqXk7KWSpktfWP1yPfMl3pSAFHie SR8TLjPtcpO8JYAGagzgovW2xKRZkQy4ZcCb7Pt+ihOuUIo+S+0lLTkR2vDC+T/++78eoY/f12 x8I= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v7 05/14] deb-dl-dir: Download files only belonging to the current image Date: Wed, 25 Nov 2020 13:32:52 +0530 Message-ID: <20201125080301.15818-6-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125080301.15818-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125080301.15818-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684318634404913668?= X-GMAIL-MSGID: =?utf-8?q?1684318634404913668?= Avoid downloading deb-srcs for debs cached from other image builds. One way to ensure that is to see if the package is present in the dpkg status file. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 79a9a88..ce691cf 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -5,6 +5,15 @@ inherit repository +is_not_part_of_current_build() { + local package="$( dpkg-deb --show --showformat '${Package}' "${1}" )" + local output="$( grep -hs "^Package: ${package}" \ + "${IMAGE_ROOTFS}"/var/lib/dpkg/status \ + "${BUILDCHROOT_HOST_DIR}"/var/lib/dpkg/status \ + "${BUILDCHROOT_TARGET_DIR}"/var/lib/dpkg/status )" + [ -z "${output}" ] +} + debsrc_download() { export rootfs="$1" export rootfs_distro="$2" @@ -18,6 +27,7 @@ EOSUDO set -e printenv | grep -q BB_VERBOSE_LOGS && set -x find "${rootfs}/var/cache/apt/archives/" -maxdepth 1 -type f -iname '*\.deb' | while read package; do + is_not_part_of_current_build "${package}" && continue local src="$( dpkg-deb --show --showformat '${source:Package}' "${package}" )" local version="$( dpkg-deb --show --showformat '${source:Version}' "${package}" )" local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name "${src}_${version}.dsc")