From patchwork Thu Nov 26 01:19:05 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: 230 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229615oou; Thu, 26 Nov 2020 03:20:14 -0800 (PST) X-Received: by 2002:aa7:c44a:: with SMTP id n10mr2051891edr.145.1606389613953; Thu, 26 Nov 2020 03:20:13 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389613; cv=pass; d=google.com; s=arc-20160816; b=RppNU0gYR4Z/hjSoeJCMZiqu1ya8BPZHRuD2vU+fs5INFXIGDnV5KLPFsc+eAGWSTd DazAKuKEdQi9v+ajcOWGYoVDajMJcxwHfLHGwxaeCU5yRF0VoLaoWtZ+GpybEzNKofIr ctJS4lf+LVqgmuquNewasrwD7cWzmOu0BopcAqryH/NoGMnl9MENED9V28aDat/oGX6/ dTa6r4bI0ZdeW0G+40yn9eWp3EflLOkiJzjcL3SNjrkK/dlP0Vu3ROeyi3Z0gKczZkM7 RsTcA6lMDhjCO3ukNl7ncXi07uMVCXlFYtTeZlxfVWigQg2diPWE9NictTxvINI16b2m /+jg== 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=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=x9gXADSk4diKzmTF7zUcUz7YrcTnhcP4SCKrf2B8j8rAk9ecrLdRMBuBaupcudj0z/ LR58XjJyfjffU+2xbeluxpRG6kF0+SbIvH2w6dTKNWb1MZKDg1Mhl0SmbTo0D7a7f3cR liFmAjFIMsOO8SoKALiA3ca2QTCuIN70AMuDk5nNrhc44OQGng1rM2SvMANozl9C2nxi Qe0A9s3J7jzs018bNmy+0kuEtJTTAFcB5I/bVNG4pS0aL93cuxjzhApp3Fc5EgFBG2sG SCgIC6hM3LMLMc8R8ZQSnY0WeLmG9LRKD5V2W+avvqyx7gOSCfl0/7ehOeyHk4TwCdat Cd7g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JBrvuG6r; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3M6736QKGQEEOVVHXA@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 lh25sor3293663ejb.0.2020.11.26.03.20.13 (Google Transport Security); Thu, 26 Nov 2020 03:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@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=JBrvuG6r; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3M6736QKGQEEOVVHXA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389613; cv=pass; d=google.com; s=arc-20160816; b=WWKxOkWAGHvQfLmN74BJ7eCWJJeYi9ghYNpTqoKocEgmDoWjMdoJIH9164yzMYi1uh 3HhpQKcJYDwD59u2+NNgFn+8Dt+VcSwuRBTkUJjCs+6ZAtJfBt5Qg7oT9XQ4cp72Vdb1 xMn5vI+crgINve1D4Dd9Sk22IMgnoVfLp5q7XgIiSWoHQ9RoOtBpf/+uJxO+oO5W+VyB Qn/hzLr4QmL+5lM/eWAyuoEBHUBSI+eQYn2auYEeVB7v1aO9lM7VjWQrcns5SG51xJWb y7q/GXkopoisGoMs1qJ7UpZhdeeaq8we4NIT0tAWMd3xughrQgk4ngnbml27qa2B+W9s Dfcw== 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=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=Y/L/hrX7R8KNRaX3/PAQ/EeAB/rYKmd9pxnI3MIydw2aYNI4uGgHxOTTJkehSbG9sw wLTVVmInEKBBw27bCaVatqUwCPDO4jCg12B7ERY+nL4z0rUnLkSMBtFpKqoG7DnYArH4 6NLtXVqzwutCCCKl33+8oFScDsKjwJxMXyOVWKJr3rF1tayzRlZJ8vXutAUwbmy5qosj EgVKlRyEHPL5B5W9LWX25Er5BYVhxwNrnWUZx9tleJ3GH/2MLHqQpD1jdMa4TYUXg7vr aF74w5uQen1nWU2sR1Mo9ZvI9B8GYKf/rZflHyxV2wvEq+dENpdBIVAMcvXbi4Omyq7k LF9w== 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=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=JBrvuG6rCpw6UFKMOWPG+nW/7C0hkGH6SK1jJ0riyI+gTg6QAFFLaV389/TwFYfDJu BYN6pCtKkW6I+feIF8X1iIOQFmRam2ObAOkvlQ6Ll8smVpSe+HsRLYLf92W/t44KzHO6 h4VX59wo02gN9yQR27D/ljSUUU0pAoMgBWFtb1iLJvtestB0uqC4RAKduydQLsMHJDXv CHJvFPGsSTXxHMyzGpp/WSEcba7wMuIFu+uVsyTCMwUERXmwwk+K53Wt6lTa2NiN6xwm tx0EMjEyaRYGrodYtB+eUK6KDMjCJBVPC4gtLXPjFAON5TezvUu0A1pzBS9v7pAMXgac O/0w== 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=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=OO3IczpxV/tfs1LSgft5EtBsywlKN8mHXV6JHAvOhemCucDdwOEqeJ+9d4sOVwrfvC /V3ALXGfDB2xXgRexISzrsATYn+dKymogktQewtT30hB0E9CMVnsoEfXdDy2yVnqBFZB vkf2HnaconKOFdHCS1Jckc7GT/mapabTOul+ciiPw/zHg8ef+jzpn4KkdBG/6dHEy1jC dH+BsSnxNi4zJ17MbY0qmvk2tcSp1rCyZw/pRYpC1kUqcCffZ+8WOsL/Ve9ykszksT9l bzjnfs54ords0bcqoz90VrAJ2idNdMcLiTZsQSc7uIwAaMRQCV1eswvr7FJnDYtS1QPQ X66w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532T+NzaDLtx0uLSNIHOpCw0DLO2IS4kigQMzaOXNI7iHuA9IvLr AfHNgd5sqb+6Le2/RcxRQCM= X-Google-Smtp-Source: ABdhPJwlek9k35hWKCDZxB5jH5M6lqMIR/6DVlpGwV2RRRgsBoOlReDN9P34aoiyJyScrNlzD/NCew== X-Received: by 2002:a17:906:af43:: with SMTP id ly3mr2238773ejb.369.1606389613639; Thu, 26 Nov 2020 03:20:13 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b088:: with SMTP id x8ls774510ejy.6.gmail; Thu, 26 Nov 2020 03:20:12 -0800 (PST) X-Received: by 2002:a17:906:2582:: with SMTP id m2mr2180954ejb.271.1606389612827; Thu, 26 Nov 2020 03:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389612; cv=none; d=google.com; s=arc-20160816; b=P0/Sn1iW1vyygihvmr6baJIom/kmDWdgCUutESedpr6x3NteMpLqC+CQ7PYY99QKqq jeCBA6K1N2EQ6MJbPnKrcnBEm/sTwC4a2lrLCsEHvagPvletuRL6bLHzcSY42J9s5ChC jA2kH69/ktUkGvpEVJei3raVuQBwsIItaz2IsSWUIu4UnaW31+D2c0Siq/VOVUjBQy3Y jGsmDUzelGGQzMknb6bgOwTBF1tZ2m0fR5GjXne+BYN616O/ya6bVbkry+b9bm5pFgOZ RG67hIBk/lopqVkh6M0KI8hls1zb3WoqOsuzdkrbqg6XVw8Nzc9s184yDf6+F39H+K2V HMRA== 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=nnvtzJhMc7REDutJqhVZ622UWfcDQ+xCPG2UXd5Ej6A=; b=fyBONQRZ5/PqpeV96dIE8Cr26FU5sDcs3FklaoTq+pOxqyD6v83lSuRiRudK0Rmw8V vxHKRfXPs7lR4uhnEY19PhqXLBZaPPfqXFmISXHnhCujtDIg/dw3gfn3eIjP/PF37SfI LIk3mbcmKKgxVHMRUHc60rlabzLmFGHMB+6VTlnMSZC6Gk05jZZwGvtJG2IkupUxfB4U pOy9RPPiGIWWd2xIkV2oy4q2Fp3Abs+gqdLXR1nXo9KcoHoILB95Adl0PWzt0KJygCa6 24+M8iKuE29uBdjTwjouC1wCMsgTGwsBSt6DzH7djV6CVF5+fDR8U96/KvMuZ8Gc0PMH rgmg== 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.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:12 -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: IJLINaDyIhsOyh7FkQBUCltpsUwSPlYC3/jsZH4ZVPUSBP95WLlSqc2cJLQDm8MIum8def1uyp FxOZ+O9do+lkbEMMVZfu4SnUgyFhXp/NDpyFUCOA/tRkREj39fcvID3z7WynVmRIAMoa0L3iJT ARrLkEAHU9JRddJc6CYgjIj6+bDRz5ECccZwcvg6id1Xz+k7Zd9mbd2maGjFOyaddZi7Q6RQW+ 3D73eE0eBa+iEoAyZvxZcXwgZvOIFwxERlOfWB79jAlhzf56EHZN4TU3o8l8xM/i9SJVSRJvZE QLs= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500428" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:11 -0800 IronPort-SDR: LGWfd5LgOpw6lEMezOjvI6ZP7lBwQZfkA3RsxRDGghIes/lJslfQN4DkhehjHH83PYzq11pdGM 45Pw2fTUatJGBSlOTMnTOiqk8OeOIx7QPuF1onDjuSN/4sHGVfOSDSTFqbNJFegn6pnSzkAhSN g4uX/a/U7L5RVcHvOdOD5kZx+NQu7/313cOcXx4vaxP+c/kMrgTg4YLQC0vBGg/bG4981Quug2 51pwZ+YjH9yoEmVKkWaauWld8jz9fsW4JjcOqHvG6w75zevMY8PElNmOjYdOdTtQuxb39FVYru h6s= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 07/14] deb-dl-dir: Fix skipping of removed files Date: Thu, 26 Nov 2020 16:49:05 +0530 Message-ID: <20201126111912.3037-8-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?1684421595840564249?= X-GMAIL-MSGID: =?utf-8?q?1684421595840564249?= Some packages are installed and then removed, like localepurge from image-locales-extension.bbclass. Those information would not be available in dpkg status file. Use dpkg log instead to see if the package has been used on the target. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 64d1823..29bf45b 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -7,10 +7,16 @@ 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 )" + local arch="$( dpkg-deb --show --showformat '${Architecture}' "${1}" )" + local version="$( dpkg-deb --show --showformat '${Version}' "${1}" )" + # Since we are parsing all the debs in DEBDIR, we can to some extend + # try to eliminate some debs that are not part of the current multiconfig + # build using the below method. + local output="$( grep -hs "status installed ${package}:${arch} ${version}" \ + "${IMAGE_ROOTFS}"/var/log/dpkg.log \ + "${BUILDCHROOT_HOST_DIR}"/var/log/dpkg.log \ + "${BUILDCHROOT_TARGET_DIR}"/var/log/dpkg.log | head -1 )" + [ -z "${output}" ] }