From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6899390751905415168 X-Received: by 2002:a50:9eae:: with SMTP id a43mr1986101edf.109.1606389613733; 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-Google-Smtp-Source: ABdhPJxeejqFKzHs77pdFLMbne/pzJ72pQ//vIaRk3v2XE9UnLBa96sODD37rx/7pMwXRmlFabD7 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 Return-Path: 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; 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 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 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com 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-TUID: gxOz/VqOEL8C 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}" ] } -- 2.17.1