From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6878157486786871296 X-Received: by 2002:a17:906:b01:: with SMTP id u1mr3173499ejg.427.1606311885558; Wed, 25 Nov 2020 05:44:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:4396:: with SMTP id ne6ls1105427ejb.2.gmail; Wed, 25 Nov 2020 05:44:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnjX7Z8ZTvFP91L3waXUqNIzZThHomucuxn+V8VJJJoTbxJbJjwkHMsliNz0UVWqR7V06+ X-Received: by 2002:a17:906:4059:: with SMTP id y25mr3206879ejj.498.1606311884587; Wed, 25 Nov 2020 05:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606311884; cv=none; d=google.com; s=arc-20160816; b=qA8pf33FJRnB+4Ou7N0CdWBS1NG1QSP+z0G5fgB42wozXvGqPZ69AZ1IJesQ7rhXLi Q0wAtMIBCGn2hQUEJJcd9RdQhcapeLfUp0ZywwST4rFr/gBPLadIFLIbSXf0+r9O1HWo bBstbUzH38bUR88ytWtSNHoELaK048VwUL3KSLUoruHX2lZXOq0pZY3FX+TMoYW6m3mz wYKbcS9ShLDH0qYhoSos+CfDVEbPd6O2xwlrvOdT6WKH7A+yWRQJnv8dOuUgsvyWAHBo JumHUedByfLc1irkPQPJB4eOs96D3FHiw+hX41zGYJgH2ldl8TaUbvqOeQn8vzRihFxo M8wQ== 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=waF/cg0xZ8LCRUZtxCRDXkKPva0/PrQwMXUieUs+908=; b=hSGBFjXTh7+TmTws0nMI/tRHv6R2L7fIYUp6rtKIA3mRBnJOrnIyuNfg+t7RSvLDf+ 4ut9ZAPNlrsV/+5m6+mWZCLG6GWsfyWuEeB7Kt7mqpz4SNtLYABXyHKqBxdIcYWKxS4j AFIW/PDtWoxieNnqxnboc3bFigvjO6R0YMS1sYK2EdtsRImVHxnBSOWYY5WCMOSyz2Ps xHYQEhvpg1maUWVDdDImwQbYvqvMgLnYbrM6frneJ25w9NxFfwv3/JV+TG3dvDAGDQiJ Oio4o953gO9sVQUnIA1Hm+NEEC6dnYWuECBP5FxBeDEW+hj+ti7g6hAtbNVCqWtGmB1U BUKg== 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 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id v7si130589edj.5.2020.11.25.05.44.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 05:44:44 -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; 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 IronPort-SDR: qm6FSRRnCDqSNqxCgEv7Wz++kR2D6KwvLeGNtCvBNXOgoaklLZEGex3a5p4tuWxFWQ1slddY4d shG0dQmtA3d6wBQEg33QpHpCfhALxQGHpr+1HBm7G4jgYN2mRN5jaI6prIMp2U/eG0mUuJiCw+ AsD6YV9bgwuyGDnI1/UpzMSWnPGdDE+e3uJ2I5nqU/4K5HJ9VYzIboyOG5KL/HAf2jzRdsmhH9 njbCcnDffcMPBDB5QYPEGWF1Kc4dhs6HfVznccsedgrJyb15kPNd2n/b2tVaCJlm83QFUkxQ54 Rxc= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="55597780" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 25 Nov 2020 05:44:43 -0800 IronPort-SDR: TcGe7QGCvqBSv3/YsRXw33AtYv1FydnqjUJOnSUD5u6FpnADgNjemvy6S+UTCGmV8I2vayWsnv F0OA10rqq9MVdogY4hzBPL8/Mb5h5mwND7HuYubGoKGP1OQfPvIoXE+j9IPKhtfoQbLrSOossx AF0jzIBD6LRVj4IqkJFbKScFltyoyHzCv/EdF63d26D5uIQkdh08gooXiBr6fr4feyNEolm1Xf g6BnmUA+FS74gHL1354zxBl8pzXRpdBH+jdvDdWcsUYrgmB/oQoIXkUbWPS1XQkpqy1v3OYh51 lao= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v8 07/14] deb-dl-dir: Fix skipping of removed files Date: Wed, 25 Nov 2020 19:14:07 +0530 Message-ID: <20201125134414.26061-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125134236.25878-5-Vijaikumar_Kanagarajan@mentor.com> <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: B0uWs9onLwx2 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 b2d94e7..a94fb10 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