From patchwork Tue Sep 29 22:06:59 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: 97 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp4809303ooj; Tue, 29 Sep 2020 23:07:34 -0700 (PDT) X-Received: by 2002:a17:90b:1256:: with SMTP id gx22mr1155830pjb.47.1601446054332; Tue, 29 Sep 2020 23:07:34 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1601446054; cv=pass; d=google.com; s=arc-20160816; b=btrgtCOnD6Q8xWi60wryxE4EKocpK6yImaGiiv9cmnn+DKNsk/QyQ7PVxojaACRt6S 0LC7drIdI0gEKSJn8nPsc+ES0rMu1g9AX7BvLYNLjzgJV24nnpLSpmQ8hlXHoAbxMD3O gqiv/n8jgfQ2B+GiP3qzl5BINDNUsW30RSLT6DzSax/5n9za7ZWv61x7yU6m5s3HwBsv gliT2TTyYfYQlrYrCRfA4nFNWDYxPVDTLSX6eHtCQBlt156NZCXAEtbNR4KBpoQt6vrM r3/rHHkuxL4fhbluTH0I/fY/xBjFeeHQgiTsrmG3wXcR881G2vMLvgcYopgmcGCUf3KG CLEA== 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=uDt1t61Zvr7/XsBrhouOgqerym3BJnQ88bFQp8ynvEo=; b=x2Wlak9/LIQlwCngewTbXiMlOPtm1Krm5JBGrG4CYFCWlLvGY3pEgkfxKP4ZfoMa/v 2RZ2kniqQmjXWLIZ6ZNy49OR8ppHicSE33NP6PadcF4P3ljiGLOsWR4GI9DumGg4HAP5 v6fyZOn8r6iVHTOJxUm2YN84gF/zpkfHo1e7J6K5W9124PHGPRUIKWQDyG3662yT8NbL rmz9Z2rvEk7ctJ6NyzYDVglC0zwIIxI6oy6jBivYMdMdXaium73L3jvx9EBfDFrsSsi3 eCadye9U0aWeSRE8oT+PIS8dxE7PEVVBFZn689MEnHRWlamlh13D7y2ukF5MPYSzXJ/o XlBg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="NUq/+yIm"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbjob2d5qkgqefketrpa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBJOB2D5QKGQEFKETRPA@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 w8sor285278pjh.33.2020.09.29.23.07.34 (Google Transport Security); Tue, 29 Sep 2020 23:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbjob2d5qkgqefketrpa@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="NUq/+yIm"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbjob2d5qkgqefketrpa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBJOB2D5QKGQEFKETRPA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1601446054; cv=pass; d=google.com; s=arc-20160816; b=QC1XmmOzVanQUaT6zDkNmyo5LLQ8oed6qdrQ0594TaSpYDe3MzK804cQQIMFE7rFUx FmsZaaxSfHDhFC8XQ11hhBtu6XzRAHfQU6cJFKqLe7q79bnfIsoZ/x1XwqJca5nSwlYp btwIvULrTmAjpAirzgN6WhdwaagcpV2YDplRShEMaBtJ9xzi0do7AgFK+dumIONFDw3Q NUU5qy0IryTU/dcxoFTfbgILzxFt5qoWFS3WAOpEXwQHo4oBK7+X9h91CUS+LTFlSky9 JZS3z4Rpz8HQIbxFR52owjsR9IYLjK78mQJIMs3HefiWUge/VEg8hW9eVT3RIY1MeaPY lQZg== 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=uDt1t61Zvr7/XsBrhouOgqerym3BJnQ88bFQp8ynvEo=; b=IKbkhq9uH2ydKUQWCV1E/Y8NPOkyEC+gH4CY3qbkiVHafLA0UrO6tkeWEo1wg+uUia oDPTkcE/18kimzWItfH+fXTRDCpvSTT0DzXIpVpStU5i6+Uk2gbpCgq4GOy9R5NfST7J d1fMIj+XeuIXQweVHNxpJvnyZQY7FS3cEEtiPm/NPh8m+/nrU/XFR3Vd3jl2MQvf/ZV+ nflpRLDslGFaC5BRFlqx18AA9fNea3BCbNLmBCaXEWC0lb1ZFifqy4UZRZhPn+FHPrLd BGxpv9UuxrtdQlkrx/X2g/PehW6TEVtjYqxhvNEx+I2DvDCwVtySi27BbskgNv5ANb7p lcdQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=uDt1t61Zvr7/XsBrhouOgqerym3BJnQ88bFQp8ynvEo=; b=NUq/+yImy4u0P8pziBHrxhM5GZbdSPRgQd0gcw8DE1EEZxNp7F+Vi6pUnM+U2gI1iC 7WHaLOJZQXGl2BSQYGz9iQZFod91mZ/QCfMofMWVXGd0pSJYHfLuT4KQDdV4A6eMjvcF nnigy06Iy5u5qZ+s1hCUCCuNOjlRJpWkAlMgFHUiU6tt2M6ZpmsIKdqCkwEU5SUJ4ilj nVx+c+I5Ygz9o+Xai6YyCCeSvL3Q+k0Vn5J8cPeiMklKVMfVGcxFqErDukum2lZF6g4P Q+LiFQxxxPeGdRyEKl3SH/is7hPYxg/pGVGwqv5p2Gef+7RGgBF2CXdhqppzusudj/fs ku8w== 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=uDt1t61Zvr7/XsBrhouOgqerym3BJnQ88bFQp8ynvEo=; b=WYfavdNAKl2mXLX/HcKBqjIK53CoIreOpZF7DzUqMRxWz1MT0nmFZ8jb9Y+cmFRI/p 5mekQAZHdq3MWbQb0+P3dX3S0V1qu5IijxDsJzfzNRLfoHF3Ay+yRocpprvq3IOJbIwz LyKWF+avVNQNLymGOkShG5DDioj3jp3Z4p46w/mFPAPK9IxDFdbjG3vapgaI0BVJnPIp OfcXqIG2B/DuXg396bbh/9O7WhRLWhq8YrieZqL7UCI6clIEpH1/T7Uw4M/ifTx98LUF 3+ePI1gxaJOkiVzeGvS6ZN8Srarbvr2xjKrOFsAJlVv6LYKvy9GsB7c8oQ1IhFuIXBfx CI7Q== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530UIci7uMO7ID2WOXSh1VWZ7RTjdnOo/RIWzbt0GLEGsxHmd2zw /CFFv3XOKX/Rm+iU0/e2Olw= X-Google-Smtp-Source: ABdhPJyPzJZjuAL+ClXHLhb7J/G582xG9U8tgULx3ls0V4PTOIQTAfR3UFnavVJWRYYmyKYk9+t5Fw== X-Received: by 2002:a17:90b:1098:: with SMTP id gj24mr1159871pjb.55.1601446053951; Tue, 29 Sep 2020 23:07:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:96cd:: with SMTP id h13ls417543pfq.0.gmail; Tue, 29 Sep 2020 23:07:33 -0700 (PDT) X-Received: by 2002:a63:5349:: with SMTP id t9mr978898pgl.62.1601446053390; Tue, 29 Sep 2020 23:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601446053; cv=none; d=google.com; s=arc-20160816; b=s3jRLcMg/tfwSFv2g5yyUOB3w+cBSzuNQeFY/P6L/qyp8emHHinYcFuiAX8VFZFACW 2aXWyKZvijgNsZ9wJdSbnkqoLESDnRrwRGFN/c9upzlL1noj43CSR06BIe9V3Y6bWIwf rPZ7kymAXHDEdsBzQRXQr7o+3R98SiEU7pQt8UC/MnbOOhUBuGHCnBSUq32Ev6Rq2wgc iq5ysUDr3yNgzRECF/o+aJ6faa0ATBEeQ/RMG/YvRKC7C7lC+RfhX8QVT6y1zkBrt+fd av9qGYJKr9jioFheRnF7+GCZufsVS0HsnmtXhaVy05phoP8JmvX6BgSq/VLxEZVmJSDp TFPA== 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=uK455B5WXmTaSpifHTiluh1iNlDmQzK9leCSW0C1Kx3Dd6zg9R4HcSosrCeIjOWLKx bIDRuaAouyvzFPAdNttofgPN0vzYqp0kdLaLUYmGhC4SmC8rJs/Xu/wzTQsETSThbFXL oucQhx3yIIMJFRIoJCBRXRf7sk97lYqjFlcnEYhDfC+lz93CriGT8b78hbGO54or7Rdf aUWWrG0h3rxIq8IeUg3L9leAbo5IBhhdqosr2R2p3ubpMQmRlSaNqWEAEco/suWFUAIb 7T7OfsT1rJC3fYI1lsjsFN42XuNoYmDLb175k3EBKcfl1xYgfCttjmTL3fb6sHlP4HwA vLxg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id e18si48100pld.5.2020.09.29.23.07.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2020 23:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: cIejVpjFocDwOVk0rEpnV+FLu3K9RckAp4n3CjtuZlvf6z63yYvEpSCkV6B7HD7Sa9Ox8BJck9 U94GdMtJzvwlY0CMeV2M0Jla7VnB2Ws1vbMyVkL4CrlcPFR5WkV3Ug1q/9LODxIV+Z7M7ZVyEZ KRgs/zdVBXM5+sBOmA2vJFCqZGz4k8mQ9v43ne6O4cUeFHEWtiWj4uz2inGh0cqjxahuOMSNst u04Qx3HGUaJhUyU+dIroRTBo38zEcPBfyAHYhxgvf8S/jtxeix4/25IEuWbMesRhOcpBcxl+6j fHc= X-IronPort-AV: E=Sophos;i="5.77,321,1596528000"; d="scan'208";a="53462093" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 29 Sep 2020 22:07:32 -0800 IronPort-SDR: TJR1qBDkGA3Jlab1OyDANsKv524cKo/xMxqT+mRPeaIH8JlunV30/0TYEXGPmH5HncW2cYVwq2 9h1BtLeRTvJGKtW2cSytf1ZcxEN08/K2/ykBsex6gcnuC1ezX8BqRHQpvbkG9CxyZPIsSzUAE9 NC6q34CmTQ4zYEfO6v5SqTRWZ9MMSbmwdqwdKaETV5YXSOny/pUeMZvRaSI0t37M0icRaByObg 8lnC6o4FhU/06ut+b630wk/f4AofRTJ8g5i6ud54HcEQdtW/MJAEC1NQ6y+04KzuETstfPJK3P UH0= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v6 05/13] deb-dl-dir: Download files only belonging to the current image Date: Wed, 30 Sep 2020 11:36:59 +0530 Message-ID: <20200930060707.12785-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200930060707.12785-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200930060259.12422-4-Vijaikumar_Kanagarajan@mentor.com> <20200930060707.12785-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) 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.141.98 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?1679237897926674166?= X-GMAIL-MSGID: =?utf-8?q?1679237897926674166?= 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")