From patchwork Thu Nov 26 01:19:03 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: 228 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229510oou; Thu, 26 Nov 2020 03:20:06 -0800 (PST) X-Received: by 2002:aa7:dd0d:: with SMTP id i13mr2051948edv.174.1606389605881; Thu, 26 Nov 2020 03:20:05 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389605; cv=pass; d=google.com; s=arc-20160816; b=LVJiYhn16AJTI2XmlVFbxWBCPfPyzxhBxkUfZnPxSCsRuUDyo45uhgOdlW0H++IKSB zkIrSSXT5hvkF8gD8COwQQCAnLIjRSF/0s1LWvsrBPaA96wrsdIbigw3D0zOfg4pOUba icJ8Fo9Q8cBbkqgPpK/WfpsF2brs5iLsKgCrhdPz5JZ/fZmtKxEnPmvvs1WeI1VSXNdw GeYM11TRUJFNwnk/3arULN9XK00gx5/EPe7BV3vc32rX8I/rc/RYRc5qACVrYNHKJ5Dt 4KarpNkbONW55MPnWfd+Xhq0slr+kXTfGMlSAKkzg+Y9CAwHqBvHMV9F8bpopgVxEI2J v1+A== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=b4xEqMRHPBs8Bug4ue6t4LU8YGACif14VWP6Yava1X63zCGOJm7PB1MhJ60RHwM679 O2YCJ4EjvEUwXRO53I1OmawruA/dQl1oX/fLqYgtmjYuUB0CtDW1SXVCxGqH/hkt3Qf1 9CI20FncqX3G4oMOxcHR+ZEsfiEcjWIW7itR7hqsvzWnvO8kPo+zwaBkHReWr5esRNuF L/mKsopzhQ5XSSvY+I0KpW1/68cPlZR5NhburIJD67EH6BJKceZPRygLl1DcmpRPAD2t ozgbLu+FRhc1RwLoveT3/RuHWuWvyCHXQVD3qITwlKPedta9eCdlKkeKFLDBQzGYuWn3 2WDA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=KX6kA6I2; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZM6736QKGQEMKBAZZY@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 k18sor3333235ejx.47.2020.11.26.03.20.05 (Google Transport Security); Thu, 26 Nov 2020 03:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@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=KX6kA6I2; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZM6736QKGQEMKBAZZY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389605; cv=pass; d=google.com; s=arc-20160816; b=Bu6WnWfFsaFB1ZBAdMbAD4z/eoQyHZzHdaWseHWjmk4dkqOWzAN6igj7Wg/MIheW4P TM2njWEZC9EQogsnRdpxw3bPC6FZhKmUbTmRATl+0KxMKtSHqKRsnPN/BIEjQhNovs+O gWwz55HtRpHx+iA4WIVuL8rNmD21567fIUKcsZOJEzvwU+K/Ph1F7RFyCWSbBCwuRRjc 4fHrwsRxh0N0UcmNwXjRf5XXWjReK6mDPuPJ2IVIPfK/tKc6sbpFcutq1xtl33r3kwXP EQVdvaE4yowkpDJ+nbLw4IRkvnhrxFwDtCkaG/e6tWY3sL+/GSv0LHh/XDVnq9JzezSn LYVg== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=gSgqITFBPbnZgBqbZaIHvfeWnnIpXoRGFtiTuB1hBk1sGnuH49iznLwLjw8IAqZleq BrfexPjkxshjugxECWhOt9CJ7Dc0NvqOTBGfrxZ0bZQ2zJttdm9KTwnx9ebU2PlpQVz0 kvhjAVLWBUe8YesUViIvJlsZMKA2ov21e4UkuMcr2FvKS+txk7fLrl43wrbeT1MV/Yui m/Rq6mvnfYpVG5SJOl1OVrRfjoGSmE7yfMC+IuvR5MZ8htbCRStYLJs/3KkNZdOJCyRI YiwWFtsVFeY12Tp/isQXufi1d97rsUCHHFDPjJbAemt2eUo4ZkllPhMPdJa+nEBvdkJP bk9g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=KX6kA6I2JZhWdK/NAXwXPOwKp53LfvY7li3C+CHM1Ng2gkB/FSlamkaWObZE8yukAP xmd6/G1RkZ/3XZvXvjvvjatkYquYSYkrp7NyCws18J5yor9ZVV/EbWn4m7j3VKWrZzA9 UOeLRr2L6Vy305qpG44KnQlF1WvBGZuSIjjA1VNhqzGgJnUSXHeT5R4g5hK2fIM/pNac qs7KQQhbD7mffFvm+yuGHqVX2cq3G1w+s9SBnxfSydBmn4Dq9Xza8Qg8tB5oRGsFfJ2J 2qSQF/yisAoPCmBta0peCEyobM/L8JQkBA/Ww/vKJoDs+krk6ULx8Fb7DyI8W0DMUMY2 HpJg== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=dxyTs2NLnJCv0qYqS923DMKvPyrUbNwIjBlx5sLcvWbkHSCJfiLNsA4y9Bj06M7aet cJH0tF4AJ7BSesl8NOR5GydScNBWGU2Au+p+oXwpQzpoi+vYNLKbzidJ5nK+Yg+4blBC QK3H3YcMYzoLIFqcZK3H667vt5a7Zf+i+1jDxe1KJjRWw1N5kw2syYebU3W/5iKK3bVj 9/avsd4t+IZBvEfgKr0gqpQVS6Acr4FM/LAKBxHUj7rvfO+j/9d/w4Go1DWQVRu6LRsn nni7UKap7PP4pYyRjqrnjCw5SrxvKyPHmrX8tJK/Pn5odzFRijSmkn5bY1GqffjfXMcd 27Uw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533poVNjsKh+6aMHDCuxDkHkwWQmtbS/KOAuUXa0YvuRonTRLCWI cPwxTC1vPYjpkQD5iS+Uk1E= X-Google-Smtp-Source: ABdhPJzOAaIt+qo7/RHctzg+j7uty46QKjI/fybFJSCGxk67ylVc3ClMRBDt8YAo1jsRg+1cJFPrHg== X-Received: by 2002:aa7:d34e:: with SMTP id m14mr2037959edr.42.1606389605553; Thu, 26 Nov 2020 03:20:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b088:: with SMTP id x8ls774281ejy.6.gmail; Thu, 26 Nov 2020 03:20:04 -0800 (PST) X-Received: by 2002:a17:906:f881:: with SMTP id lg1mr2134383ejb.133.1606389604753; Thu, 26 Nov 2020 03:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389604; cv=none; d=google.com; s=arc-20160816; b=qsqtpZ0SqO2hLIi3LxeZNpH5oph+EsZHqr5KV3PejiaNKA4aucGed8I9p15crVC/fh RQrMUCQBElOMShvDPcOtNIheItrH+3RsApMovPzYLJgLWuybL+UDUmuJybcI3IIo6ecT MPzj0aP+CzYDMo3J56UuhTqdx0K83UAwUtvv4ox0NVbmp4OsXuE6xp9sM6lQwbPxhWVE jrrzT2VpKYj5PDljxnQgFHl+D2/ZfsTxQpn0UwGJCRzKx+kD2OBmzwk0sKzYmV4h1MnM 91ZuA05fMalA9k4PT/UtMOqTRzV05pwwOREG07x3REhgCtPH+54TnONikrOm4DuvmNx6 NsPw== 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=LsK3RWeZ21+9gsTYf1c6xS9YR22fRC0uB7teF73Wwt9BOgulpu8x0/pHeBrD3uZvto +jXy5lvPNky1dBsrp8fwcnDArkKDKhL6Q6taGWoRtAKASN4Zxe7UUeF3Ds233sqoTyNs 7NGTx+Gwqm61uLNtB/Qzikx3DaOiQd/VpMzSHGZaZmDfPtwbaguc3jkqxIF8y7ZcfzWW pu4TNeF1+msmmB/9pkssQV5vgnH2J8EpshC41QLdYohexklm6FlHD7FQrlYb9MjOLnAq wT4+3SdpoNfndzGT0A/Sf+DZMand75iajHVnleiA7G5LcgI9BN/Ns04gHVmW5OanziZT /F9w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: jhD36xtA4eV02JbzMFOYB8T/4LFuAxZp8WSS22CmezfOSEXDpoUSRZQkLL6PyaxiRpRd36LKyN VUbWNPk0boZ8qzqylDf7BN3aqYtvYyi8khc4rrCoB0ETFiGjcESXRxKV9CeWHZ8gRBBgm0yUaD DFZ4qJQaHsuN7z8w97ZJ8Amsa3kDq6k9FVWC8toNeqdZDJFLf5JzYnFSOj2uqvMto6Rewi5tth a4XZrXF64AVS0jSWghlI5itab8gqjff2qQ7HZEd4szkgyBQEWvxsEBAdFd5SxerNRTn7YaXh/a Hpc= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500418" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:03 -0800 IronPort-SDR: punq1KMA7sMysw+GakBNqQxky9QnOQ9AuIn7wYkN/YaX5K2uGzhZu3ds7/8H1tdwNS/rugdwaP RsIhFAyfVbZFCpIr0gjVKi/dRgyIIYon2m0R/DTQvrSZKFqUGNBic98KrYqDS7FamF/GvXzSzQ LGaU5l4W9OiiGEQ/3PbcZgEjNztn1AiT25ddtqV0UhILjtBO1r+O6q90EwquCJ8Re+LbBRq+wC 31LTkAEW4dL/4qsqaMGBOmal3lGx2Laz7OJ/MtlYeCwzUby88VnZ2lxLtWYk65EwHizBopJIJa pq8= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 05/14] deb-dl-dir: Download files only belonging to the current image Date: Thu, 26 Nov 2020 16:49:03 +0530 Message-ID: <20201126111912.3037-6-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) 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.180 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?1684421587152075917?= X-GMAIL-MSGID: =?utf-8?q?1684421587152075917?= 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")