From patchwork Wed Nov 25 03:44:07 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: 213 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp372391oou; Wed, 25 Nov 2020 05:44:45 -0800 (PST) X-Received: by 2002:a17:906:4551:: with SMTP id s17mr3078616ejq.545.1606311885770; Wed, 25 Nov 2020 05:44:45 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606311885; cv=pass; d=google.com; s=arc-20160816; b=dHjJuERu1TSBiyzDszhqY6N5g8W/VnOpfdvSzV0Td+6TvOVfgEBY3ythl73+27SP+u Pal0xtB0W8q2rDHkJSo2euywDUZ0CpCIZjH92paydNQ7z72XgZteXVwr67IVzTXy1qr8 CoMdniQPpnEylHjMv2g26FCeW6q56mDWraGl7l2SL99Fh5pYuOvz0R5yXhPSr/4jj0sd llIvwt5S2M/b0gXSf8Gb+2TpkiKf+Qpu03ci9KK8gKI4IqVtlckVUawMzxKWXvOxtNuj t/EE0PE1AqIbzgSF7ScLBESXiGk0bKRMs9HqPjn9bB0emLVHVsSoYgeFdwK+jF0kaEGZ 6v2w== 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=K+akWpj3R6dZexE9JDe3K4+R/9lUIUaNKUKxbqMdgcg=; b=FHZk4O03W3FtMKQNch2fbTUYZ1kXfUwSFbo4bviSGblBnYfaZwdJQJboFY41+Ee+2J SIHL7ptzf8+ttmvG9gpmbq0FhDPpue/HbPCKpssUesUtdQMvVj/2Lm/YWFd5S7NZdJAi /mfTld3c4xQw8xUqXBTVHhNe71osPBt2m/gKeMjGTBabzDbz8wkgwRM5EuZzUbT16L7C +dzRRkYtgKyt25uqrJ2eE7EPhjC6C7yp0V6OFasqOl6MhxBYkAgXoaml069Lb34yOkwz COh+IrH2H/65RwD3yUVmRWC/RuPPjk6arfJpIR6sEucg1joMhU2Tqx3HR3fqzNMfXc4T E0bw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=M8977bAF; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtn77h6qkgqetu3o4mq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBTN77H6QKGQETU3O4MQ@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 h3sor2192805edl.20.2020.11.25.05.44.45 (Google Transport Security); Wed, 25 Nov 2020 05:44:45 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtn77h6qkgqetu3o4mq@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=M8977bAF; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtn77h6qkgqetu3o4mq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBTN77H6QKGQETU3O4MQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606311885; cv=pass; d=google.com; s=arc-20160816; b=hbnqe2TO6RXWHfubNjDWm6HGKE5iz3PT4aJk5FKP+ZmQspYWvOs8BQVwtvjwqGWzKT Sg6kooASvTMv2uvbHYJiEirm6MRpZUujaEp+sH75a2RrPSEXKhaKwCsfhu6FqeQTLfxQ 45N2pM12IQfB2lfFGhi/+5uEJY54s/kch4EkCd9fVcHK/j/xJUbikbDHs/ujGLM+1W3R DbeF8rNwAP7gi33EkRU0HIExxK+BSVJuXrk6zRPsquCbvrzJ8oxhPwkklOB4IccABZrx 3yrcIvvqbTqEw3uLkhUmnm0cSrrhKCgrwzB5Yh49Yl606c0/ZWSnVduoqQt4fmKoXel7 wa8Q== 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=K+akWpj3R6dZexE9JDe3K4+R/9lUIUaNKUKxbqMdgcg=; b=iCzofPt/tQBkDF2MxWkegPImvlqrbLxXKeoKIjrPjzk+w9N6g8sLTMVhQyu7JnxVdK KW+n59WCzVEWyXdWX2w4OuY6mx4rWfkV0Drv+1tcBTSrOQvxQ1pb16k9GN9LcXrv5xhu wj/YyoA6D14MKwHGFUpge/IFW05duWMOlg7111Uap12vMPNGoI6IjVNyBGEi71/aeO92 ymK7CLCfFTqawbghJ/t8SHNaIAYnHrS/I0st8s2NovPMdcH5Bu9H1ZdDh+7hAwvUuiso i430rfgpm5EVTpkb6ss+q40kRcWkrM4IAdwOj7mIACynD9mNzGgs3PlGrKf6Ks1JhJIc fyow== ARC-Authentication-Results: i=2; 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 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=K+akWpj3R6dZexE9JDe3K4+R/9lUIUaNKUKxbqMdgcg=; b=M8977bAFnOJQddbHdZBmDIa5lVUiQniFwuzinBDbcFLk9yZqDRjVIxzy2gclWSV8K8 f0POnAqzARQamcM2+ttT9jSWTwhESoMDSiICaBbKjKs7L1FI8xfJ4FM9EEWBbZC12CSO IlKgRhVRim17zep+Gc3bCxAS2napGVzaHlqfdsom5Y1eX1au/pykNjq730bCqtG/pUuZ +UIKPmDQDIgmY416hgmt1ID3FELZrGg/eA1tBSBAyP6n7mFPXw+EyoSR9i54xeMqToIR 65oj1jdeitMqD32lWtrhgJDClboYLehZbAm65Z2IWzZoQueHVfYl2iy/mVSzfvDfORUh af2A== 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=K+akWpj3R6dZexE9JDe3K4+R/9lUIUaNKUKxbqMdgcg=; b=l64LclG4dOLkYCYGWKuzsO2zccu3504E16MkuA0DYfsBcIuDcCKMIfBRrNe7RzzWyv A01nK4WnlqkiqIqgCJUvj5VCMtLQ01zOAVSVYi640YSnA/Tivece56U/xK7AwdCuZlCA tIC+hUuDaMybGCviXGnm1g8yCcnrdX8cfCCv28xg9kY3LZYYUnXHs6I3A/HFzRsMCrk1 V9s+f4HtS2HBNYknT9QiM+hCxkWaimkxsXKW67gZb+r/PLLPW3x3jPSpXZ1WV8hyehey RonIuaJGigBzDkgSoONWGUokksJ/C9FNDuHvQUY1zate9h/KRm7Ku5cl5Ft9Ebsk7g/Q 9awQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532Enwtu3ppLkMQxrvLxnC3HcZZHquezVVU2ywGkJCPun9nCZTH5 b5SkEz62+bx+1ITIJGyh1Ts= X-Google-Smtp-Source: ABdhPJxzLBESBfNdV/FcMwB5QL92t9YBLaU8hMIMjvDtxg8EClPob0w4esgR/3mQeF7PvHpYv6pAHg== X-Received: by 2002:aa7:c54c:: with SMTP id s12mr3609638edr.175.1606311885521; 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-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 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; 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 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-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.252 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?1684340091695279670?= X-GMAIL-MSGID: =?utf-8?q?1684340091695279670?= 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}" ] }