From patchwork Thu Nov 26 08:28:09 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: 242 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569272oou; Thu, 26 Nov 2020 10:28:58 -0800 (PST) X-Received: by 2002:adf:fec5:: with SMTP id q5mr5515016wrs.245.1606415338109; Thu, 26 Nov 2020 10:28:58 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415338; cv=pass; d=google.com; s=arc-20160816; b=ADcUL9KD5wvKa4lUPg3ikCFVIJnfgxHqkhQXGOdy/wi191dQMixrgY+NJiDfQZ81hf LVnQwcKrpwsbUMFfFiTZsDlK0KgJD4Xd0FMd9koH5xO5vqHOzc1zhjL/w2pSU5/3H2EV P9nlBRiscoTgYwhYGvZd60TaLIW0ts3K1zGUcqjdcJ0zzMwLyA9Q4o5U+Ne35Qfk7DeF +eAXnAaLINTAno4Bi0Jt+M+XX4VOJV8tQgGKoDddTWVDAA2XbQbAZf6Q2i/3Hh5y6DOk 0etEUJfz8ZEPtxApSwFjgEzRu6m7GJaEuF5EF/4ex1DearlZlFBj0eW/cv0MUcyTcxw5 E4Dg== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=UYBCVkB5KrHNpWgdxgcXH8OOFnKJivPe7jifvmDkHEzucMDvK/g6C/4RsuOQGVjoKu wwUtq33NOOkjJpgOKCUcyaRJrs8ldQK9MYl7tmk14oVYjW1gIZvhXuEiAzMk6iWiJPCx 0HWlXSgyNx3I28EemImp9QF1y5r+x4B9m/+gjLgf+QM3cm5+wnKa7VzfC9Z5sgnfg6op rSkolioe8/x61rBRikUlunH3Q7C+gJ80u/9i6O3y25GxXIhHCiJSYB3M+Z0xg1+R+8Bc 3bEe7W/Xh2BNgV1gBhxvi/DmzRx+DzIdyy8C0wQjGruh9/OqQ8DPnhydmjgP1NS76LYC LgeA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=UA4DEX8x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2PH776QKGQEYIAMQ7I@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 b17sor3152738wrm.19.2020.11.26.10.28.57 (Google Transport Security); Thu, 26 Nov 2020 10:28:58 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@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=UA4DEX8x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2PH776QKGQEYIAMQ7I@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415337; cv=pass; d=google.com; s=arc-20160816; b=ClLdxjP+sbMUqLy3ZgAwQG93Rl563S3RUjZG56b2B2TMjTtw3aML55/QWgGEgayzZ6 5JHvWuTlGC+MW8FlZENlasI9jk3NUND/F+WsjRUn0VUutFcaPbHjP09b6PKhfAtPFyE/ dvlKvknR3xwLwDtNjUQa7wvTu+c9GpcT6lqhMtYjFh+vKQ3O4jRQAmjWYfUMQamO3zvz MCKLcm87gM2i3lNGvfoV2aR0LgjudkvvbZzwEZ5NaZ1HxLESwuu4g1GaGcZZUq323T9v B8fZXjhcA/cdt11HVB/zqTwoI/K8xCk4zKWFlNtlgc9E9Jg4687IhpJYVQZcJH/lisfq 2f8A== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=WVAq7ZmTvy2kSVWgmA7m39vivGF3/fgFzEKcYJC4Jgj+dcLf+5nq/pt7eCZ5vyiesB jU40qjKzPtL3K7/vjdBFcjwLKuue601jOV0Tge5M806+fxIEPAmAt/sRi7BZweai2SQZ fT432fTy8yh5ZkPuxZrrPQpjaIGQn92LBqZ2icPqN9+LcmTBDrGv1zj3pRM9I3MgwfDZ 5sHH4E7mHJ8UNOiz+cDzXbt9P1JgEz7+U7V46pE41B/9ZQ9iEz/M/Q/bh+BLokMYuOYR Ks1o2fxxUpblseD9JJ95i64KgRqRmxvSYhf9M2xrfh3hMUnl3AMAPlwDPTiIXehOq50e eq+g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=UA4DEX8xMK2Ks7Iq10+1EBq5GTtaT+UvhV6MR5qoPLuxZ1kX/XNFdVwMot+a+PLQMf wUdp/EqKZFQiGXxuXqHbecRsVOKs7yauWp8Yku3Arsf42rA18Bzm8fKJpziF6ooz5Lc8 IOt5Egj7htiRs7zpXMR9t/gpntrO0SkPmDOz+tV1uGrGcAt+S0L8M/P/4BA5Hwsc543P 1QdjZKRO5dl7c4vF7uLyMNw85dKznug2gy6XE/ZBqVGUpinXYLzRL4RfS6oCh+3mVdIc oUkJmUTNgrd/gM5YBjqRrim4HSOBhdwemdU0uQ8+rECRoXa2hXMzA5kldBGpFl2nFtXo yfaA== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=HTtjbyORPCNGFqp4eTGXvadZ6PTB90lHU0Kp2FGnVLT3yVAWZK1rTs3os0DsURoKKn HjI+LpRbvNv0SMt8KcnS45z6pJuVrHrpjwmY/NpI05pluDX6qy+bcmDXvgp1LQMpXniH TMonGK+l0cmQXq4XYZ979h8F/6mzBVE4seOZoYK3tLv4PlrOskqBtHKIbwR+irmtlgMv Sirm0eMcsNAsvG8DzM85gwz/IN6oJu6JpNQNw5kS1XhO7JEhJijUUJayb9r1++sYL1lu AVJalxQTjriIXis+/oz8yf17n+xcQiHaFSa3ZW4+bcsGIALqSwNmBRz1dmQPy1vtc1dJ GRLg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530Umjx376E8ctojT617IQXdNfqOdfgX4C2cbaEUUpyGZs3c0Qm2 uEpCxJBI8dLdhIsZ8L+SxGg= X-Google-Smtp-Source: ABdhPJwI5upAChJUHdgC8tkiUt5+/sPLHMdtSne9trFJ6n/fgwR7/o5Hc3+pyaB+CUwPXZDbtAcTYQ== X-Received: by 2002:adf:b64b:: with SMTP id i11mr5417868wre.78.1606415337819; Thu, 26 Nov 2020 10:28:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:cbd5:: with SMTP id n21ls1357852wmi.3.gmail; Thu, 26 Nov 2020 10:28:57 -0800 (PST) X-Received: by 2002:a1c:f715:: with SMTP id v21mr4852239wmh.2.1606415336960; Thu, 26 Nov 2020 10:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415336; cv=none; d=google.com; s=arc-20160816; b=We+vQq1rBOTG55kqIA5+IawEvp87Z7RifuWWi0dzE3X5n24CR5oj0UrJ/0clMdOrmI JOdl6CRx4Et9kB8JGLJ4Nd5PXi7EfUvaWY1mYLuYfiRz/aUSpixyT/UTuVBL6xfrCNnW F0PBK7a95Yme+guOJG7EsEMUT7WNoKQddnThns5srfFV1/32kvnMl4iT8hRnpL2IBapa E1wKHBoEzAStt+VwLam1ITxM5VuoIHFBeTSf6Dafiy50CJL1W16K553H+E18D+0UBhbU qW2VZ3WkfIniDeeTgOg8q7CZ5FSJvfgJUNmN3qgxRGqfpS0LLbbQHHsyOlt0I7S5ebAd UTgg== 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=NqdlHWbslZz6Koeg529KaDOuH+cifcn0yWfiuZubAEo=; b=ayBFs6Y/fpnXas1NShHSWPWL08qY9MfeTuDcGAD8984asAAFmqDFxicDeJl/y5LzY7 +Z/sTiuAEcZDTI+ACAB9kSy+A+DuBbdtWeHG0aQkKVHZnD2nXGi3r+aBT5dxyQx16lbx SsytdfFwdgyjOQlR+p/EwdTEErwM9AxXAMrniYNTLhgWY83tUlzs/A3DRow2HUBBubDl PBX3uO8fOM4wLnMPZvHiCIK6XAGXLRQmwQqU+w7cOT++cZFHDxXrWlmpHhUjjHCjNa7U MnSDkF5PaKplGBDjNaoioXTWru5K/5uIB4BHCeTuEVk+wtHVgvGRwyJO45+XkMy/QvKZ 3ogw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id y187si226499wmd.1.2020.11.26.10.28.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; IronPort-SDR: MC34ZR4WDpuJZbzDkrRoIECofxJQUJkAcsji/v+PRGaWWx/jKuJ8XtVZzxfJgzAqbxXtH3pu5M ibBOOuBU306fHRXCmT5+ykl1yq2ja0h8sIvLn2iEpSEV2ifUhfb7js9KsGzHEMrhI83aFC7rJj vvD9dBO/+ags2RiwvALtHGu4fbWWFnSGMQqWkuExguEoMLbKLLjdnbsJtGknLmL9NiyNBxTmbC 8UwTk2IGW3Xz3ssrEyqF7YLjmgzo1w4Q07D2oL2kdj0PS9EiFflUKKyO6I3lICU5dx3aYqhNjh ARU= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644673" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:56 -0800 IronPort-SDR: Ur4TML6icwjoIeEiPgZVfw6uSyKnOaufd2kdN14FboFs4r2msWpcEI5azQO99PZb5BVoRVqXb5 +/TfPRmkThqjB8L1tSb1e33F8/XcmzgBZoqaj1UzZl5+f54kpDWowoHezsRfm/FWXkd8SnKLmC VsxXw/zUw28lnfMjL7fX9/jqkzbY3PPe4wiF2TDmyOMmDHhSzkzGEwAv7BSH5No2FEzvAlWjwk uZMIpRHpW61row3Z+Uso4vX2B8f5gdxuq09+WqkEIi7r+7egeZk8iaj45lPUpuU5JzaJiiudrN N4s= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 05/14] deb-dl-dir: Download files only belonging to the current image Date: Thu, 26 Nov 2020 23:58:09 +0530 Message-ID: <20201126182818.7261-6-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-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.137.252 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?1684448569566065971?= X-GMAIL-MSGID: =?utf-8?q?1684448569566065971?= 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 0e2cef2..410befd 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")