From patchwork Thu Nov 26 08:28: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: 238 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569170oou; Thu, 26 Nov 2020 10:28:45 -0800 (PST) X-Received: by 2002:a05:600c:2110:: with SMTP id u16mr4834324wml.178.1606415325738; Thu, 26 Nov 2020 10:28:45 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415325; cv=pass; d=google.com; s=arc-20160816; b=utp8NMLTuX23uK+Zhln/JZR7ElpAouEErR1/4yGRbTIt6nQX3Rkp6/bFkIToA0xO21 dnPjiG4kdWU/HdCNEdq2f5wN04z8wIUZ+NhNBCJYIK3UhU1nxENQL3koOLlt1OjvR4vX wIdbLu6oBO1vay93Elk/0/SehbNx/VdznSsj5W27G260NUalp9w3u3D7DruaVQD4tR/J oAydNlBPbzMZPqEJ4r5sXgj+snvcKDUO0ArEAm2P8yxqoTahf1H+a384Tc45y4tQpqJa 9jpdVJB4m40Pz9Anysk/l/PkSLjTRBln3bpmgIWFcnJsQi/E6AkpCdUFDoT8ddAArXnz k1iw== 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=tYQgP289eUo8t+XYJ+oTUe9qvTJst1mjxrWS9PeDs/s=; b=J9fQoI7XSOORnEhSj2I8G6x6vgTXmc9WvGKH5y0zXJJJY9HNsvGeeU0CwtqlYevPjb 65It7S6Cc+vqurtXOftAzYknovDtufTXoW23WR3pg23Bd5CG7E8lVoFAMK6WOZ4372Zb J4414EQ7D1y4FpNydBHDf+aMVb2It0kI7c6Zvde3j7Lv3Pfl46r6WzJdpS56WYjtvk3m XxJBnhxR8sPe/TUXbERXNGF2/y0fV11zCzuDfqq3oBwdBT1juig6MIbtBs0xHOUBzfUM 40XR8WH0LDdDYy87vh2fcJRP9teQdKyOamC1Xhe7DFGIKdQf1JdB+m7ovOL2LFhb5qGm Ysvg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="rC5/ZXV9"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxph776qkgqe7spdtpa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXPH776QKGQE7SPDTPA@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 l17sor3191184wrn.59.2020.11.26.10.28.45 (Google Transport Security); Thu, 26 Nov 2020 10:28:45 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxph776qkgqe7spdtpa@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="rC5/ZXV9"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxph776qkgqe7spdtpa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXPH776QKGQE7SPDTPA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415325; cv=pass; d=google.com; s=arc-20160816; b=MWoUYFjwdZHsWr89oqDIj2LtheNS1Yi2oa+rgem54KAkQuSqjrvFtBwGSQjPnaTWT3 6Z/9SlJzTqK8CdyrW1+dkfBJlOYzghWICw8w4uk/hNjr+r8mEn87WtRuYArt39zMjlnq Z1+LJMI5vDE40GIA232Cz94FZ4n9Vrti+2bOywUgPwktu5ffblLnUX6qcpsaFosSRQmp o9w11qo4Jfy/YABjuMZ5gZ+QRi+PZqysao1ZLqY/xT/h29RxF3C4cAdOeoXnIMupb3in CEx/7XOdHW517JmC5m1/b5K/T0W43Eq9vcW/nutPkF15s68Pk6ZC9rKA0XO3zjb8HX+s tcnw== 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=tYQgP289eUo8t+XYJ+oTUe9qvTJst1mjxrWS9PeDs/s=; b=YfOKEs8Hfo7L0v2TJqI0BpOgmwuKoU7sF8pEvzao9KUQeeb9gl4wNfCkvTvJsz3gNP qXk3sUN8jZ8LpvozRZhvvmTdeZgxDUfLSpkFngDEl223AsCrh4YGFqYIEWEsrhZAUuW4 92Y0v2TcqcHaRNT/VJNgdnQek/iV+XXGYwB91gNDl0h4ZwHDP5cxLfprYo2d0rcnMgSz NQhmvXRog7iq+g+F86rb4PeElcR9oGRet1e5Zoo07DSgX5XvrcIShKzuxmTgnIyI3PiV H4Td/n5Ec5SK7mz1sgk5QCl6S3LCPyUkBdA0J31/l38+WeaPyZ7YL3B9Fe0BFTh/8Gpt c6yA== 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=tYQgP289eUo8t+XYJ+oTUe9qvTJst1mjxrWS9PeDs/s=; b=rC5/ZXV9mLHiA6Y4zmj/1j4BLwtQYqNQy+063EYnqar+IFsbsvDzyh9P0m8arjLQEs WGskXXgVPBLfZSr3Ns1Vkew0rvEr7vaQ9j11c1uKSIbCA21pp2JsXME4eK5G5SNF/C+L zvWhCgww6ZQPY55JVdy8d5QGzFbVFSl3XhQeoUAMrh8fAU0qQNt95Uh8HhhZFpSwRbSE XcIngFpXPkD8uCY/S7tGe+w85ti92SF1wtUCXIJZkOx3yjfBx8tthSmHSzPxS45Sa77K bVMPj2I+fOtV+w4SSQ4nEYCBxmg43m7RE6BJK28HWpLejKqYQQhfD9cDmZUA3i2FwMu6 TNeQ== 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=tYQgP289eUo8t+XYJ+oTUe9qvTJst1mjxrWS9PeDs/s=; b=Toiwn6gh9jG4P203KG6SFn3jz23WvtZvs0AEGhMYxy6AHyWNZUGKO7/5nUh2LFvds+ QeuAS6O5x7Z0mg0Q3wmhs5cInwZ1i5LosirxbayTlo1adyEZSFF4QSzVnzdA48qUDhOR VevoYqIQBDsMa2M8kD8RR2XkApl8+WrzdqPa4mt0x1iFFSIpR1Iqs0LVP5/Qjf8rTk5e qKTPlTymKMou+UuqOWFYA49iJjhNgwHnqYeNFZ8EYavz8WSo/oL0lD4VuqPd2P8gaHzN seCS45eMr2mZXcN0vfPLbRTUl2pNxfY+vXfGyDqvI6TZtr8VSV65WJwvxJC2WUa0IhFq uubg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5317BhbFxZ1g6iD1EpPgaZ4BTWJGXSbPFLNvJkcdfXDD7SAVbgpG +/x5hS60DH4CReE+yFH/FtE= X-Google-Smtp-Source: ABdhPJxJMrpdHq7e6pvs5xHrPqqGcUlKtjJaOG9ytAtMKsPosmye7Sy1GQ7cU6spDubyCvm7TGzXcg== X-Received: by 2002:adf:e6cf:: with SMTP id y15mr5388652wrm.403.1606415325450; Thu, 26 Nov 2020 10:28:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:1fc7:: with SMTP id f190ls1359611wmf.1.gmail; Thu, 26 Nov 2020 10:28:44 -0800 (PST) X-Received: by 2002:a1c:f311:: with SMTP id q17mr4666999wmq.28.1606415324560; Thu, 26 Nov 2020 10:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415324; cv=none; d=google.com; s=arc-20160816; b=jokV42sVqet3+X4LiP9Dr+n8CGOnMS7Jz0+Xbl9sub6SjUHleOoHferYX4G6xC2Pfg xePA0OgXVa3L9KDkqS7Pov8vEcHJK6A0wxPW5KP/J3J8zENKasOB52whtHUF3UllXKG5 YWc5BhG9AavUbUlRc8B+hEQQtgigg1viTSWTtEfp0vfRzgOiUkey4q+Te/9VNPV9orNj 25Jfs1W6v+YMAef5lmVuHMJiqhWl+RQKqjSch90qmbge4Os+1ohnJe+70sC+ZS+64ZU3 KTqUzAsqUghXhQupmSbwRI4DPANyXZck7Cd5Xd30CNPGfzDcsH+MmBf+awQr5VuNzaOu uh5A== 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=+psr9IKvQzg/5QPjOWPy8KP08uOEmtcwfcP1pPeRXoM=; b=gzxvvBd6lReqT1GYyS1x7gA9qwB264R21jZ30019rVWWZnWXNLCWisCA2LI+yL1q2B zug1KU4WRv8+BurkI449X4kyPAJge2Fpz4uWp+ROZDrcX5n+KOCGUBtb6uGjzdPPTA0q yn+LVmJpIw7RRdgw5FuWVH5hpSEz6HXbNK7UDJqIgZtpnOXdjhCPk/4Io0Bq/K4OfCTT +zkbYL9j4IQLdJIBPd6OJE73Pp6+sTK5R2vq5M3nK+yUMjs8Ie3DuU6yecRvvVnfbH4h Xh4phzB6VsLSBdQ0CmiEQ1l804iVQ+y3xcHPr65tRBP4kMrsYEGeFqwtaCw+B0fRT09Q cIZg== 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 y187si226499wmd.1.2020.11.26.10.28.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28: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: zH+AHhU09ieikk8y0rkO3ngVxgzeC1Zp2/bRCMo/0VFWQvs2ICnbviBdWJhopMltAIPG1MmYQ/ 9bEN+bjQJREqyvMkd8oNaObeNPCdfM9WZZppGGuYfMt8KtorM2STHP5RUvMmJtB4oiwkx0PfEB hm9oaQYRKgfLhmqN3L0jpxfoN71qq6BFYVh5GYuzjR7YGF/TqnL9WPVuUc5kvZdsSQFw6zT+zY olCmi5malnJz+PcB1BDU9isWEBYV5/O86mUWviK5i8PLwlPqGAx7k1Y1cuc408uSOFQQ5TQnW6 Nyc= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644666" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:43 -0800 IronPort-SDR: 1eJrD0b2cSmYgO6e1OueafZ5GnFnp2QciHjT6xOz3PWb7llsAV2q3RgANhdITIxuAxpo142stp ghBgYW60vq3mFm2Bb4M8o1rzVKk3ihW64FOmrGBeH14zBPj4GWgjbKUlAGa7Di8a/yzNpMkt3e FtIWyii9QKTKYQsewRwjcbvvr4XB8vcQJ2WPP6dKgVFGy2oqWq83r5q4jL6Kxk+0Klj1oWgpDM xkoAh0giPEbXgAAPVLlnTS2LHJTI1iLiD6hVj5YmDiR4D7hlpu/25LQjPATnlp7bw2ebd4DqqA Lpo= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 01/14] rootfs: Make rootfs finalize a separate task Date: Thu, 26 Nov 2020 23:58:05 +0530 Message-ID: <20201126182818.7261-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448556741887624?= X-GMAIL-MSGID: =?utf-8?q?1684448556741887624?= With the current implementation it is difficult to append a postprocess function which requires a chroot environment. For example, to add a postprocess function which runs apt-get to download all source of packages installed in the target. rootfs_postprocess_finalize is not actually an optional feature but instead a necessary cleanup function for image class. So, move the implementation to image class and make it as a task. Signed-off-by: Vijai Kumar K --- meta/classes/image.bbclass | 41 ++++++++++++++++++++++++++++++++++++- meta/classes/rootfs.bbclass | 40 ------------------------------------ 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 8e350a3..cdde195 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -63,7 +63,7 @@ image_do_mounts() { } ROOTFSDIR = "${IMAGE_ROOTFS}" -ROOTFS_FEATURES += "clean-package-cache finalize-rootfs generate-manifest export-dpkg-status" +ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" @@ -174,5 +174,44 @@ python do_deploy() { } addtask deploy before do_build after do_image +do_rootfs_finalize() { + sudo -s <<'EOSUDO' + test -e "${ROOTFSDIR}/chroot-setup.sh" && \ + "${ROOTFSDIR}/chroot-setup.sh" "cleanup" "${ROOTFSDIR}" + rm -f "${ROOTFSDIR}/chroot-setup.sh" + + test ! -e "${ROOTFSDIR}/usr/share/doc/qemu-user-static" && \ + find "${ROOTFSDIR}/usr/bin" \ + -maxdepth 1 -name 'qemu-*-static' -type f -delete + + mountpoint -q '${ROOTFSDIR}/isar-apt' && \ + umount -l ${ROOTFSDIR}/isar-apt + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt + + mountpoint -q '${ROOTFSDIR}/base-apt' && \ + umount -l ${ROOTFSDIR}/base-apt + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt + + mountpoint -q '${ROOTFSDIR}/dev' && \ + umount -l ${ROOTFSDIR}/dev + mountpoint -q '${ROOTFSDIR}/sys' && \ + umount -l ${ROOTFSDIR}/proc + mountpoint -q '${ROOTFSDIR}/sys' && \ + umount -l ${ROOTFSDIR}/sys + + rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/55isar-fallback.conf" + + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" + rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" + + mv "${ROOTFSDIR}/etc/apt/sources-list" \ + "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" + + rm -f "${ROOTFSDIR}/etc/apt/sources-list" +EOSUDO +} +addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess + # Last so that the image type can overwrite tasks if needed inherit ${IMAGE_TYPE} diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 5b63ae7..94176a9 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -12,7 +12,6 @@ ROOTFS_PACKAGES ?= "" # 'clean-package-cache' - delete package cache from rootfs # 'generate-manifest' - generate a package manifest of the rootfs into ${ROOTFS_MANIFEST_DEPLOY_DIR} # 'export-dpkg-status' - exports /var/lib/dpkg/status file to ${ROOTFS_DPKGSTATUS_DEPLOY_DIR} -# 'finalize-rootfs' - delete files needed to chroot into the rootfs ROOTFS_FEATURES ?= "" ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes" @@ -209,45 +208,6 @@ rootfs_export_dpkg_status() { '${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${PF}'.dpkg_status } -ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'finalize-rootfs', 'rootfs_postprocess_finalize', '', d)}" -rootfs_postprocess_finalize() { - sudo -s <<'EOSUDO' - test -e "${ROOTFSDIR}/chroot-setup.sh" && \ - "${ROOTFSDIR}/chroot-setup.sh" "cleanup" "${ROOTFSDIR}" - rm -f "${ROOTFSDIR}/chroot-setup.sh" - - test ! -e "${ROOTFSDIR}/usr/share/doc/qemu-user-static" && \ - find "${ROOTFSDIR}/usr/bin" \ - -maxdepth 1 -name 'qemu-*-static' -type f -delete - - mountpoint -q '${ROOTFSDIR}/isar-apt' && \ - umount -l ${ROOTFSDIR}/isar-apt - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt - - mountpoint -q '${ROOTFSDIR}/base-apt' && \ - umount -l ${ROOTFSDIR}/base-apt - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt - - mountpoint -q '${ROOTFSDIR}/dev' && \ - umount -l ${ROOTFSDIR}/dev - mountpoint -q '${ROOTFSDIR}/sys' && \ - umount -l ${ROOTFSDIR}/proc - mountpoint -q '${ROOTFSDIR}/sys' && \ - umount -l ${ROOTFSDIR}/sys - - rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/55isar-fallback.conf" - - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" - rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" - - mv "${ROOTFSDIR}/etc/apt/sources-list" \ - "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" - - rm -f "${ROOTFSDIR}/etc/apt/sources-list" -EOSUDO -} - do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}" python do_rootfs_postprocess() { # Take care that its correctly mounted: From patchwork Thu Nov 26 08:28:06 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: 239 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569197oou; Thu, 26 Nov 2020 10:28:49 -0800 (PST) X-Received: by 2002:adf:fa05:: with SMTP id m5mr5424338wrr.26.1606415329004; Thu, 26 Nov 2020 10:28:49 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415329; cv=pass; d=google.com; s=arc-20160816; b=pWj7B8FAjVF4mYVEgh3AR7/hS9Jh/GlIGpi4f80wIHRLA0nWzXF+BuRIANCyV1GUDk DJZp1ypd2SuoHeRLsGNoAB/lV/6GiVYGQh7ZUOP90haRG/WQ5+iIt8pnF5agTxRL3kpd DPytujMk4dSPzMENfmQI743lKGYwsZnSq/wJJwYuYdjxkcau+0Mt5oNHrrlw6WZUOogd Aylc3dcMoEXsj2bzxgRanv6C4T2OoetCZOMIkj0H3GKMyRv/LqPzYFXQITBimV6mgvzN fyHvQKChj5hdKB2A9DacRxuUz4+XJkqSYNE2OPn619LFxxd2GpICVQa4YwXHW2vVBuK4 yW4A== 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=n/vg5OOfH9ZUnmzTTI0L8kC5lrS3AkIrdHbRQcDnQ0M=; b=TXGget5Qf96Iix2TmSVMXr+wmjdGQPaOfxDMI6209h/u6ZBM9wPRwdElqi4eXLPjYZ 5CeJI6MWSlfGvW8TSTEyhyaVjKP1AzclHLJ+3wnC1MStKIVR8qT/DUwgEsoC8EDx5LJg Ox2DY1BGlxRz+lA8b0q21IOqZRpF2hJPOJrJFKYj3aGMPFYn1vHDwdjaa+cbXxSD+Ofj FLKrxdKOPMMndAEQ3B8GO7QM+gmEG+/RxZwiaXDlLrISGiVrJvunSwJI4CAWl3SnYRE+ qo2wNpVlJq2LAjwOJj+x+WwsV6MBoTkG63VyUy3ChFq/Tbrr+Jsn6qpgLl7Tp7hQ/P3Z /uGA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Tkh2KsgC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbyhh776qkgqeml5orra@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYHH776QKGQEML5ORRA@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 u12sor3337455wrm.54.2020.11.26.10.28.48 (Google Transport Security); Thu, 26 Nov 2020 10:28:48 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbyhh776qkgqeml5orra@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=Tkh2KsgC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbyhh776qkgqeml5orra@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYHH776QKGQEML5ORRA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415328; cv=pass; d=google.com; s=arc-20160816; b=SWeKqFrZth+B+D9G7SYc1Ev9Gu1PlCeazQAH5tnku61N4fnpYrkAx65r+GflvNc8Ak F6iEXE/8nvodGOnNfI2C1IUD5qTkDD+41HBgsvf1dZBJPMv6QPsUFThC4Fpw1TeCZvzz 9xZRLcDrUmH14pQUMN2p1rkMSX7rBe2z/Km6ARK2NLLoHIytAYkw//wsG0+TiKbVDEvb X1Bd5AY/XUYiYFDiCiXnIM0YaRMFfwMUK9rg7gt1E5hVgMYlP3wq82Y6OOpWix8xhcV1 E2A0AO2+J7UKdYtUsRdN4j18+OFKTeHMIwWi0dtyOZQAw01rNe6Ue1yxwbIM6sfq5Fyd +29Q== 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=n/vg5OOfH9ZUnmzTTI0L8kC5lrS3AkIrdHbRQcDnQ0M=; b=RP/A3zhC51jj+N5uyGe2Uw03IiacjhB0eapRH3H/CfOayBo6r2XHrvxTcRU+d9VxkZ NyHJczD+qQyTZdsXgxYQ6cvk6xyZudE/A3cVse2LUJR8l5raSnqIG4qj9v9vJsJ9YtYJ +CJ1ZQX7dlSH6o9WSea3XN+0i817uFpR8BNF0hUZY/ReI0MJJlq4dEzfd8Uwup1a6ngA SEXPMqSvyRzU57Wnw6i1SzTtSuK4F2H/hRdqlrH6nOgRSRyMDExZqVJRZBqgp8o4zTrW /Tits2TMi1elXuzprdv9Pm+u7On+tbsRDzAbYOKYlORpsrTLD4eXI0zj2u/9IHgnVTsJ 8+MA== 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=n/vg5OOfH9ZUnmzTTI0L8kC5lrS3AkIrdHbRQcDnQ0M=; b=Tkh2KsgCKukQQf/qALkj8Nn6RgSAeXu19/9h2OsGnwkDwEjiMvBBfGYXSzsWk/hPBB nM7ZcKH+JQP1PCsXkJY7whFNyJvtwDCPHEDS9VfdtoH6yWgc4q4evsFaDRA7OZ8RnlKF nNpjH9uG/1t8SND6VOxcY/tjjDZfOUuQNeYd7L4CGws9tmV9zNRp/d0p0tNu4hbioY/t KBHlsM4kubZcGEwG/TLQ+kg1H+4Kosc48BL9Oiq2BXsx/CuUav/bCmvTmo/TYFcz4fw0 Ij+4AdPam0Sacc69Ln0N20pxDZPtUuF0l69XP+r32lLCR5zwKUyah0TTjGqe/NPFavfc QC8A== 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=n/vg5OOfH9ZUnmzTTI0L8kC5lrS3AkIrdHbRQcDnQ0M=; b=o2kZ/F0hPuWBNGP6khF75fViBHg5V2tJwoCSNLlx0XHtU301xsuiasNALXy7PqY4yk sMCc2wxyub7Wwy3C6p39ei6hOJpBuBNtkOnW3gAy3qJukTaW8mBNAcPbq4lkszKh6mLb qF6rt0Ol7aMMN6VvVPw/lXGb3VnEEZ424FbHR3aDVq66uy03GQ8ld/y1swVzbGKGPsES vd2/H4VY+LmVWvg4ef0THsrty/HLhqnZGwHzz+w6y+a4xpvWq0+UqNpMAJ1Wuoz7eAeL LR+DLfGl+8To8zDthBP9Ybi+uMrovakbsZz0pIgR13ZxIaD8OjSRodIYr2AKye9tfmMv hsOw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5337in78R9j7/8WscYM5gCjoNGWclFCWdsvhtck4rMnsAiMQ7Td2 ACofwxkNUSOaxOyvYTHeu6U= X-Google-Smtp-Source: ABdhPJzMvKndQBas54U4qu90h/FB7odhPSzFvhWLWrzXTNH0TX1/YiY3iDMyUxGM8hyGkvuG70YMjQ== X-Received: by 2002:a05:6000:187:: with SMTP id p7mr5361042wrx.240.1606415328527; Thu, 26 Nov 2020 10:28:48 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:414c:: with SMTP id h12ls1363185wmm.2.gmail; Thu, 26 Nov 2020 10:28:47 -0800 (PST) X-Received: by 2002:a1c:99d3:: with SMTP id b202mr4863701wme.0.1606415327710; Thu, 26 Nov 2020 10:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415327; cv=none; d=google.com; s=arc-20160816; b=Lju1ZalD2M+iBCMW8+uitP6MiMF+1gH9neJcmBReB8xdoKL1/cEoocZznSvEt1Ezsy DWqKA8LphfZsQvK6SEsOtCz+sh4OLqYM+b76NPbuC6GBM5WvRF1jd0OhdJP+R7YtbOhg hX4ETfYAfXo3u/K4OVyO+KWwMTcIutNWhmm42W4yUCH73RCepJKVOtf4rnbGadhpCXA3 bI/VZuBAQEB4upbAU8Xmb01hC8HEWYv7tDpJpm4IQaIWXBI9IJx+Kb3MvRMMaHI33Fpt u8EzxB/Cn+72n8h+ImRPYmt1T5c+4Rg9USmZLGh6W6ipKP3M4yWY4SeKh4ktYZfvapuN OdxA== 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=CcxF+h+gY5VZjfQc95myp3jqvV/95Wcr7OHdKs/S9xc=; b=kjZIGzgbUEV3oHeSNeqkfZhZgxZEWnZ87Vr51TEBK1fg0dmdSjKXDosyYFdSOMbZwT voyLDk2Yn8aI41K1k89nmxM/+iJ3G4nzdZjMS9P8EhVZGiT2lf8RmXunY+luJ6KbJ9uV D4+sFl1CFji5MUOexbD7cUkQcwvubVaoqvCGy4zmCe1XtwdRt4DJJeuF3WVABBmADKRs UKB1hgIqzCmDBuIjkMJ9bmvQLAQBcjJ4CXOZ2fV3ggzZMDlK3HGr+bw0BJn5CzsyV6kQ 0RunIfkWK3Vz7ejtn+tZM020Lk6jQJ4mq/nE8BhAZni+Z3xD7Y8D7GH0eyT5n/8OobWU ahuA== 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 y187si226499wmd.1.2020.11.26.10.28.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:47 -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: gUrtbjKjdFqV1X6T3k7zLu466lXNg8X3qCgYaPMOOHWsoTxkFIt1MC94F7bFmzgT70Hj9bapxo qcYD9MGRSTfl0gsozwZzVGidhURdxRZ6/sPMCUnbgFEEHeqhWNK5CBF2zQ38+aQVQpT5vRQk3V KFn8hmfehpu1lKVB6GM5D+fBCbOCXv9qJzCCKWa3jU46iK/t4UQh2Uo3ohg34QDixa02SRZvlv devy2SPrD+wfbybiKu49zzaa4/DPNAD/8CaIHSPi3e93nY7eXZctu8TPC/hcASpHXUDievawhm upQ= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644667" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:46 -0800 IronPort-SDR: jni8B50FK0LPjKg0PT1/iITrXQ/3fvyCjplW39/ev6yfk5rWeQkZdhrQgxGj++WmKEicjyby1C rVm9zKP2HEdyv8+rpKWuGg/lmeqrTtSK2A0yOwM2NhhzzmsXSdSng+5zKa8GISNneZMzCIITjo f3fELgVedxAzTuBRAn6UqYvzi8kectfW5Wu4Y2cRhDdrrk2pwxp8orPTNw/rPRyRbyBFE61HGv /qiZLtFCZFgXaJWEP/tDgBaMKhz8jcxYIrDSwU+ezpa6V68ud8osswzITkC56OiulKk76JDMOL hWA= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 02/14] deb-dl-dir: Cache host distro debs separately Date: Thu, 26 Nov 2020 23:58:06 +0530 Message-ID: <20201126182818.7261-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448560303378255?= X-GMAIL-MSGID: =?utf-8?q?1684448560303378255?= In case of targets where HOST_DISTRO!=DISTRO, like rpi-stretch, we were still caching the debs from both the distros into the same DEBDIR/DISTRO directory. With this change, HOST_DISTRO would be cached in the relevant subdirectory and avoids mixing of debs from two separate distros. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 4 ++-- meta/classes/dpkg-gbp.bbclass | 8 ++++++-- meta/classes/dpkg.bbclass | 8 ++++++-- meta/classes/image-tools-extension.bbclass | 4 ++-- meta/classes/rootfs.bbclass | 4 ++-- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 12 ++++++++++-- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 54c2994..92f0259 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -6,7 +6,7 @@ inherit repository deb_dl_dir_import() { - export pc="${DEBDIR}/${DISTRO}/" + export pc="${DEBDIR}/${2}" export rootfs="${1}" [ ! -d "${pc}" ] && return 0 sudo mkdir -p "${rootfs}"/var/cache/apt/archives/ @@ -20,7 +20,7 @@ deb_dl_dir_import() { } deb_dl_dir_export() { - export pc="${DEBDIR}/${DISTRO}/" + export pc="${DEBDIR}/${2}" export rootfs="${1}" mkdir -p "${pc}" flock "${pc}".lock -c ' diff --git a/meta/classes/dpkg-gbp.bbclass b/meta/classes/dpkg-gbp.bbclass index afa1e19..ba5c3eb 100644 --- a/meta/classes/dpkg-gbp.bbclass +++ b/meta/classes/dpkg-gbp.bbclass @@ -12,11 +12,15 @@ GBP_EXTRA_OPTIONS ?= "--git-pristine-tar" do_install_builddeps_append() { dpkg_do_mounts - deb_dl_dir_import "${BUILDCHROOT_DIR}" + distro="${DISTRO}" + if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then + distro="${HOST_DISTRO}" + fi + deb_dl_dir_import "${BUILDCHROOT_DIR}" "${distro}" sudo -E chroot ${BUILDCHROOT_DIR} \ apt-get install -y -o Debug::pkgProblemResolver=yes \ --no-install-recommends --download-only ${GBP_DEPENDS} - deb_dl_dir_export "${BUILDCHROOT_DIR}" + deb_dl_dir_export "${BUILDCHROOT_DIR}" "${distro}" sudo -E chroot ${BUILDCHROOT_DIR} \ apt-get install -y -o Debug::pkgProblemResolver=yes \ --no-install-recommends ${GBP_DEPENDS} diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index a24386d..4e7c2f7 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -9,10 +9,14 @@ PACKAGE_ARCH ?= "${DISTRO_ARCH}" do_install_builddeps() { dpkg_do_mounts E="${@ isar_export_proxies(d)}" - deb_dl_dir_import "${BUILDCHROOT_DIR}" + distro="${DISTRO}" + if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then + distro="${HOST_DISTRO}" + fi + deb_dl_dir_import "${BUILDCHROOT_DIR}" "${distro}" sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh \ ${PP}/${PPS} ${PACKAGE_ARCH} --download-only - deb_dl_dir_export "${BUILDCHROOT_DIR}" + deb_dl_dir_export "${BUILDCHROOT_DIR}" "${distro}" sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh \ ${PP}/${PPS} ${PACKAGE_ARCH} dpkg_undo_mounts diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass index 6590ee7..0b067ff 100644 --- a/meta/classes/image-tools-extension.bbclass +++ b/meta/classes/image-tools-extension.bbclass @@ -25,7 +25,7 @@ do_install_imager_deps() { buildchroot_do_mounts E="${@ isar_export_proxies(d)}" - deb_dl_dir_import ${BUILDCHROOT_DIR} + deb_dl_dir_import ${BUILDCHROOT_DIR} ${DISTRO} sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ apt-get update \ -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \ @@ -35,7 +35,7 @@ do_install_imager_deps() { --allow-unauthenticated --allow-downgrades --download-only install \ ${IMAGER_INSTALL}' - deb_dl_dir_export ${BUILDCHROOT_DIR} + deb_dl_dir_export ${BUILDCHROOT_DIR} ${DISTRO} sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y \ --allow-unauthenticated --allow-downgrades install \ diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 94176a9..fda374a 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -115,7 +115,7 @@ rootfs_install_resolvconf() { ROOTFS_INSTALL_COMMAND += "rootfs_import_package_cache" rootfs_import_package_cache[weight] = "5" rootfs_import_package_cache() { - deb_dl_dir_import ${ROOTFSDIR} + deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} } ROOTFS_INSTALL_COMMAND += "rootfs_install_pkgs_download" @@ -132,7 +132,7 @@ ROOTFS_INSTALL_COMMAND += "${ROOTFS_INSTALL_COMMAND_BEFORE_EXPORT}" ROOTFS_INSTALL_COMMAND += "rootfs_export_package_cache" rootfs_export_package_cache[weight] = "5" rootfs_export_package_cache() { - deb_dl_dir_export ${ROOTFSDIR} + deb_dl_dir_export ${ROOTFSDIR} ${ROOTFS_DISTRO} } ROOTFS_INSTALL_COMMAND += "${@ 'rootfs_install_clean_files' if (d.getVar('ROOTFS_CLEAN_FILES') or '').strip() else ''}" diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 2dcc2f8..4925a45 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -258,7 +258,11 @@ isar_bootstrap() { export IS_HOST debootstrap_args E if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then sudo rm -rf --one-file-system "${ROOTFSDIR}" - deb_dl_dir_import "${ROOTFSDIR}" + if [ "${IS_HOST}" ];then + deb_dl_dir_import "${ROOTFSDIR}" "${HOST_DISTRO}" + else + deb_dl_dir_import "${ROOTFSDIR}" "${DISTRO}" + fi sudo -E -s <<'EOSUDO' set -e @@ -358,7 +362,11 @@ isar_bootstrap() { ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}" EOSUDO fi - deb_dl_dir_export "${ROOTFSDIR}" + if [ "${IS_HOST}" ];then + deb_dl_dir_export "${ROOTFSDIR}" "${HOST_DISTRO}" + else + deb_dl_dir_export "${ROOTFSDIR}" "${DISTRO}" + fi } CLEANFUNCS = "clean_deploy" From patchwork Thu Nov 26 08:28: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: 240 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569219oou; Thu, 26 Nov 2020 10:28:52 -0800 (PST) X-Received: by 2002:adf:f70b:: with SMTP id r11mr5398031wrp.133.1606415332016; Thu, 26 Nov 2020 10:28:52 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415332; cv=pass; d=google.com; s=arc-20160816; b=pjgfXbKFXhG4buUh4VVflyyxegnFVX6opo8vFjoq1UfDV0KO76/ei3LqdW+LaP0Hou N/JPnG0y+mkk0EnIAjLxkkP2yDiAh6VcAifm16proc0Bs+HBvn95lBo7XPvrR/BNfQYq 2G1MlCGLm0BbZY5HBWYELTBbv583HVE3udAIAsctxgLjUyJJ4uSQIzzBdyVcfIGCfutQ +3c6pxoqSKaqPrg1Y1+oeu4gfqhRh8lifHD4hMvRXt0wpwVGnHU//E5NGYicbX98NV7W wLOriLmnXaJs8ssxJJeGDTr6Kh+AziaIolnVi6AFq5Vu5YXH1tFXs8b7mN7BwsdgoZTp fq7w== 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=ltjVqDgFUebmjUrw52SL8HghrwHwSUHe1OZbc3nJgSA=; b=KXFTTY7WLMN16dY5vJg01z5qXrT84ciH3LCqlundCJ+iyKF4VPlE595Rgxj3e+LOyp qSeiCpMWD1mwBXvXj2Zh7jZqhdmBN22zBzxVnDM02txy3Qg32aFGMAvojptk3YjMK0ql lraZXFQm/qZEE5F9KND5QO5s7z/XVxF/yGFpPGcHCw73/clUNWN5VBmTYSmsJAyjtGgo 8SkR8blnStqMVdwGm4cdUiLyXXtEeCudrjifCWe+D3gbhfAMPv5EDGxIIYk9zxWSibKs Zg70yQu+HYMn/SIXjBMzG45RE+9jbyneKdGShQX2Oi34BY8zMV+F3E2ohJGFxCC4ubSt 7f5A== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=PAvSf2sa; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrby7h776qkgqe73tisqy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBY7H776QKGQE73TISQY@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 a4sor3145116wrw.62.2020.11.26.10.28.51 (Google Transport Security); Thu, 26 Nov 2020 10:28:52 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrby7h776qkgqe73tisqy@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=PAvSf2sa; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrby7h776qkgqe73tisqy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBY7H776QKGQE73TISQY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415331; cv=pass; d=google.com; s=arc-20160816; b=DqvnwwQnVcyYRIFlUzE1apJFunci0M81AnmVbiWlzRJA/t+i83JqauLraolOuZ9e2v 0djC6uxwS12C7ohgVwS1MBW0ezGfeCfTcNFn01Yzj5Sl/pYh4bvPMV/CwjDsIoaaSFon 2+6GuhFInDlWo3uXM2wyJ1BbHhPS7f/Wu3ugqPwOsbYxa8NuPVgxOL6soMNxG0Og1oos 7RqPQRQfFI+Q2nnb5+Sw6QchFhTdclfXYC855E//58EuV4zgXhF/lKgjYLSQR4716GDX vTNrkOZXX1KQy5/6MHRIblr7J8p0oQuNb8Mr1o3zz+dlvHm+Iav39g3K9FOO/el5DrDj NKWQ== 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=ltjVqDgFUebmjUrw52SL8HghrwHwSUHe1OZbc3nJgSA=; b=A+AH78iudxla9oUt9lgluLZ9bYBeaCEaQJLxkYBBwArZMyfZNNwhXdNEI6dODBdGYV oha0iytDW+VswC6CbVPvAkDPnAqNI2CbD74kiuEFy9TfpjPXl70Gwrw6uio0HRJstvIb qbSY26A4ap0KzdkKj3N2wN7Wa6qGZJJEcM1ZKq7e0pSyWgDQPQSj+QbG61XfkX1aauLO /mgblw7cICRu5AA6MV3OeIFv/+wwIL29gqQmrmOzJleMdlpNoCsnRwLTe13swOTB0o+j 5IGExpPlnIgpTbSnTjFMCYvyWQjlhpJjI6T+xwqwabIDXZjDaTc6mAxbSaH1wFy7pDQV O9QA== 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=ltjVqDgFUebmjUrw52SL8HghrwHwSUHe1OZbc3nJgSA=; b=PAvSf2sa6n0EzmFGhj3OfK6dEvT+8vCgBhLQCjqdbHuDScrVjA0ALpb2HOSIUwdPpG gBMSunQPqvfMS8p7/miFk3C5ja3r0f90yV4aFEb6dgUpC/0sFkGJHszFl/xKO+xPlobk 7PZAsOMs2MZaMP+k45kmf+PWecAR6aGBFhNzJbSNKZETlf49Jq4ti8tf+deCTE7+BNes Ve0e90VRpp7NUHDfwKlEYR0BoLB9B3dnfFZf2eRg/I/DZc/UAotkZ90nenRLOYlchkhp 7psOQICwll7jwn8YmffivBNaLc+KaWHXMtCOtqbG6sn901Or4Vnq1mIn0+c08qhdHfCB o3pQ== 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=ltjVqDgFUebmjUrw52SL8HghrwHwSUHe1OZbc3nJgSA=; b=Hv9aMUlKJLoKyiJSTnqv5LYzxaC360ABHUjeMxkqfwT7at4L1HKdV6es7aWsqMIZf1 ibm0bPpGbpwARByxiJ6MACbTZa7uCVBfn7m5KCpPp0kHuS32JASmNpc+5hresBgD/y+D v3UC2T8dz1BipTWcCGIhGqkMCj90f9qljIjhnNwrATtAR3xLJKZTDZhUn+kyWSW8Pl0L vLLj/nfjhuStDRb7Vj4SDqr3cpuOuaWz06NzEBYUpShVhbXq8/TFoN43/sy7/TR3kvyz 9/xnObFD+fPO+RAUqNzdmmEJj2MoSjRMJP/zhoWRUwtPmpPkqKpATVxzfQFQP6RrMC29 67nQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5337Hj4g5O2SIyDtctyfkNwKazrxicCy8HM1fc7BK9VJGpCs0ZHu y+KAI5blWi9mMZID9gfs9nQ= X-Google-Smtp-Source: ABdhPJyR2bRawyi3nwQXaHqDGlimJyMcH3C95tz2XGE4LcFafxKJfqgGzWEnIdQMIMYOTyumeAYntw== X-Received: by 2002:adf:ea50:: with SMTP id j16mr5410027wrn.283.1606415331766; Thu, 26 Nov 2020 10:28:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:2348:: with SMTP id j69ls1362263wmj.0.gmail; Thu, 26 Nov 2020 10:28:50 -0800 (PST) X-Received: by 2002:a1c:3b07:: with SMTP id i7mr4777839wma.118.1606415330780; Thu, 26 Nov 2020 10:28:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415330; cv=none; d=google.com; s=arc-20160816; b=YMYETxsnjN+yh0O7ZafXiLSp5ucZtijy5qVIK+1F/VUiBPE262xwlEn0olXRPmX/QL 9JvssP+l1vPwGaSg2bxQtlRuPXmyRf9A9G0Op8sPB69Ql3wPkbIYmHVKyoxeJryFTcKT /Yjz3H7aGf0v5jNeePnb4VXcmGvdljYVqjDo3qyPeFY0Fd9Yieb7MtsInyTaQm28ZEuQ gLoW1oahTTFEsj7uAnw64wyvxm0bzLqeLTtBMFNJfS/biIWj/SIHUv/ftRYYEHNFZ4QR /VYT3kz8X+0wvRtrYQwbjzJN7UZgk9O4r10pZf5theXmKWzQWNJLKxaokuZigdJUGueT P7dA== 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=cQO/sSUYo78qSrw8hvS3rKWB5LwmfjzxgH49turPTjc=; b=emhp3qH/iJ3IHpHGz4WC48SGuFDM8PXLlQyRauXesIq+X9S15Ulg2jznx1O/Kjv1dV nkft0ZjwZZ2LrSqlit+VxcEhM5sgwHShHAfH6aeS8oCrxVG2+OqBTBvvgs3l9K59cMkT D8/LNg5GXSRIJr5de4wb9uzY+mEBPifZGUdmWs3D8BX1Nj26d9w5BF5qIIuBBlFUlygf 7MY1dEvtoQr25bCw9Ej1fkSeSCGeYeFQYw3k02UqbmqLc8+btMz3PlCfCHvcsZl3tPPF 4fihs30YrtDVgVLeDLOgu6p2UwUMbZ1kxJOEpTgw5rMbhFG+wl6doAaQen+YFZ999ZYF 8hiw== 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 y187si226499wmd.1.2020.11.26.10.28.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:50 -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: iBlcooBKk5JqqCPi+5cfjvjbnvYPBsDJHSi6hKoDm8zvhVSxF1QrdlVlJ8PKEDq/+jI0QM/0nW ip+q97dQLGg81RCsB4G22OIZiCKS/CZy6yW3yR9t/UN4jJAhsP7OHUpLj6l5Dl+ItDLnb69DL8 dSmZUVCwP6yXesJnISWmmEqX1C0+q0L56tEFkMWt24n+lj3NWNWKTaD/EQGT3pAAhI4rTDejfg EeiH1PckN/xMZvbSxCB3PJ9TvFgIDu4nhaM0CXZFZuf5M4APUIM9aXp4mB8GdZko6XUq2iFpsb kfU= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644668" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:49 -0800 IronPort-SDR: eOJsz/pzlVnlIzUv6Alpgy1faue1dgTKiDQNMLmb0QCpKvurdx0dAl9dBfh9/Iy6tQZgONR7Ae t9385srxn4B3QdQvU2hfe+3cHj+OXxR1eokUZNjEIIo/b4bd15A9HDkU22RmfO448yLAfgyO9/ StYsYXHgwWhRsGD0VnIRTZyA6SRMFcvrTcaPaN7lQcOiAekQh9oMS0buO6DaY4zxAzhqJeUg/Y LsVnxDYDtr1H3PzNJ2WxJ2shZT3q63Ih/R0gI0dKIL7KElE9k6CERI5ekFV4dfGb0YWppLPnL9 OIc= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 03/14] meta: cache deb srcs as part of postprocessing Date: Thu, 26 Nov 2020 23:58:07 +0530 Message-ID: <20201126182818.7261-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448563402818442?= X-GMAIL-MSGID: =?utf-8?q?1684448563402818442?= Collect the deb sources of the corresponding deb binaries cached in DEBDIR as part of image postprocess. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 27 +++++++++++++++++++++++++++ meta/classes/image.bbclass | 2 +- meta/classes/rootfs.bbclass | 8 ++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 92f0259..bbc6f0a 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -5,6 +5,33 @@ inherit repository +debsrc_download() { + export rootfs="$1" + export rootfs_distro="$2" + mkdir -p "${DEBSRCDIR}"/"${rootfs_distro}" + sudo -E -s <<'EOSUDO' + mkdir -p "${rootfs}/deb-src" + mountpoint -q "${rootfs}/deb-src" || \ + mount --bind "${DEBSRCDIR}" "${rootfs}/deb-src" +EOSUDO + ( flock 9 + 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 + local src="$( dpkg-deb --show --showformat '${source:Package}' "${package}" )" + local version="$( dpkg-deb --show --showformat '${source:Version}' "${package}" )" + + sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \ + sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}" + done + ) 9>"${DEBSRCDIR}/${rootfs_distro}.lock" + sudo -E -s <<'EOSUDO' + mountpoint -q "${rootfs}/deb-src" && \ + umount -l "${rootfs}/deb-src" + rm -rf "${rootfs}/deb-src" +EOSUDO +} + deb_dl_dir_import() { export pc="${DEBDIR}/${2}" export rootfs="${1}" diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index cdde195..0cc31dd 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -63,7 +63,7 @@ image_do_mounts() { } ROOTFSDIR = "${IMAGE_ROOTFS}" -ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status" +ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status cache-deb-src" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index fda374a..23643ce 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -185,6 +185,14 @@ python do_rootfs_install() { } addtask rootfs_install before do_rootfs_postprocess after do_unpack +ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'cache-deb-src', 'cache_deb_src', '', d)}" +cache_deb_src() { + rootfs_install_resolvconf + deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} + debsrc_download ${ROOTFSDIR} ${ROOTFS_DISTRO} + rootfs_install_clean_files +} + ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'clean-package-cache', 'rootfs_postprocess_clean_package_cache', '', d)}" rootfs_postprocess_clean_package_cache() { sudo -E chroot '${ROOTFSDIR}' \ From patchwork Thu Nov 26 08:28:08 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: 241 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569244oou; Thu, 26 Nov 2020 10:28:55 -0800 (PST) X-Received: by 2002:a05:6000:1cf:: with SMTP id t15mr5281323wrx.321.1606415335299; Thu, 26 Nov 2020 10:28:55 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415335; cv=pass; d=google.com; s=arc-20160816; b=rCpcxc+icX4URmIypCZgiqEg/1ZtUTQd8ZlUCwu4pHCoASIh7DUFXUBaNYe73aKjv8 IAGHsOVbkufrznDQwKVa40Tz6+dJowT5SCeZDm8N5lDQCu71Bwd9T5wHXx3cXUTKOTsa Hli6zieBEP2rMNukv5EiCeOgq2By7aPnjn1tVKNXv9b7XYyUmpXGzZd+olgUawpqq6Q3 v7koeP+24HScE6c9Kq6S/zf3f1rea0EvcrnF1SmO6ijwVSoPUqS3FDg9HOU20HlF0yVl +2E0VdrvjEWi525ANv2y1WeGToKW7WofLlrH/raRhnqAy6ToyeHeR61IveT5AMUNdQT/ hHmg== 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=Zo2q3zpX/jYG5GD+6BnU5kLqeawi9/zMR3YMbizwcow=; b=UBuyUCPffRk54gJ95gsa36ZPKXzyTqdnHbK8WysIKxw+/PYy6I0Ul+GFMY3Zl4JcI3 AnmtjHbsQu6ZTimMb6ndob7kbfn4TXFq6gfqVcc39HBXSgcc0I2FMIYHemxYTUcjQ0l7 X0e5QDHRpPrd/A0M2cS7FZ6TfkaUWQ/8e5mb/GloUEPvsqqH0qEHZJRzmKy/eAoUruYR 3WCJCT15HXm+RPbhv4ZoPSomFQ96RTATE9LQulWZBB5UoNEVnzttXhZNTNicW2+sAMB2 dUUArwMWGWGvghI/foyY95hH/priatErv9CBWen02AXIeSzzy5YF48UmMDmbyev5dBod Aa+w== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="etVc/Mnf"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzxh776qkgqei6rt5wa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZXH776QKGQEI6RT5WA@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 z22sor3319158wmi.29.2020.11.26.10.28.55 (Google Transport Security); Thu, 26 Nov 2020 10:28:55 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzxh776qkgqei6rt5wa@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="etVc/Mnf"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzxh776qkgqei6rt5wa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZXH776QKGQEI6RT5WA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415335; cv=pass; d=google.com; s=arc-20160816; b=Xiio1AY+OGXOJwe+msbJbBzHGzC+mFD6HZuSQJKX66AMeRZcBEKUvmb7N1DCzJcXtK reMe42//WUw6o4jQOMn7heay5g+LYNiXjo5qKQSSrngFGsTVi+JqRxkkJJ80GmDcT3cz ug/dk22uDm1jOKngWLmFSzUwnrgTxCZ0Z5Qf0Gdd3200mbrjBEdUy9EqvD4CAfh+wXel 0fvHyUCtydzi6sHAoT9+nhJl9GxaFjg+1fw8zTcvjkub0F+F6XhbzKablNaP7DDeMgpM pexoc/p46mS82B4xVT+mjqd7wa0+Mh72i+lPZeSzKfqXVr3kVcg+dYt0uNS2j2YOzPnm qTDA== 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=Zo2q3zpX/jYG5GD+6BnU5kLqeawi9/zMR3YMbizwcow=; b=fix4QQpz6tzNpJeq7tUWSfGTQhphFy9QBXdhxVRiDnaWICgPwd71v8mkSY0t9XQJoh JzsxFJWDWBJeV9aje6jlSlJLc3Cp8ai6y8a/zGVd1VEiIirKy9RzRSXREH1YO+j9vVg+ tGWEyJ2p3CGZmb117PVldOWjzk93j5tqASWHYB/PD4wuP9roG1fUqK5eFmC4YZJvHxWX QCMz5HCS3htU1voaJDk0d+ggMH1bbfIBNcCqL/h0unzioh8N1neYs0K/DffvQzybOsil kDvw+yMmeY9WxkFYTmHfbCxMLXAP/DszLVAbIe3ChkCamDd7UhRwVnm8yM0B7E12wCM+ LfFQ== 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=Zo2q3zpX/jYG5GD+6BnU5kLqeawi9/zMR3YMbizwcow=; b=etVc/Mnf+0G6t1okQ4oxFeGMmSQlgIUtZs01IiTkOre8YcJohSBcs5P4TN+ww5gpzv FBZaRlfh4hdtcJN1Nc6EJmhu9TlDV/kepBKRSEw6YwOR32ozT8rCjWsl43r5MexwAFJL 25eOt9xz67HtC9sXq6+CFyZdhTQOtRHrk3T8RmF14QaKa7JO7IN12xI8MCtivDv2yfZ7 2U8G67HZkTgerjfbREF0ieIIJBdunyyuE80qqxBRsSYV1YuYf1GCZnreMMbpqR2pHn3l rXEuoI6xqklx8hYykUUf1i3nAmT2G8XmTSejVP+xf7B9ID0cDgNNWSS1QeYbyIDEnryT rQqw== 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=Zo2q3zpX/jYG5GD+6BnU5kLqeawi9/zMR3YMbizwcow=; b=pCBzLrs/NsuFsKbUgJjMmQ2RdDBNqKFu3AZ0lgIWVjvw20Ry+BPg3n6BpDX9zi7O9A MOi3Q4WFfl9+qEWY58z2d3aBwd+FO8Cmh/GlNkfXTohOxZ7eeefcK8qAix0gtE/k1BGy 3F3spIPfgD0wDmIs6SiG8fVXzMcbXkgaCnd15f7bV1CJVu6Cgf9EKmGanIHxGjGvGLtc Si3iRSJBDid8EFMmOylgCBfMh/+oaQsiqiMKnkOe4Mq0YrfaQD5CiQqKc45yJ2Mktv+k OEvgMaw4kUTalZn0+tPgeEbynSK8EGH7URxOtDMH/s0+uP6MLxHI279TMVB/+RF4h+PA 9PEw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5310VyCFNJIvKV6lUhbnIuAGoQKXliwu7S0rGbikeGmLtvULrc/L 4w3Syh0514hOXppBnzdWNhs= X-Google-Smtp-Source: ABdhPJxj6+2UP4NvxcL7sxbz+Qf4N4ZBZ0jNlavdgxNZLN9zvDH1dSRSmzhCFwvV/BEgkaC9ue2ovw== X-Received: by 2002:a7b:c182:: with SMTP id y2mr4704879wmi.97.1606415335041; Thu, 26 Nov 2020 10:28:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f70d:: with SMTP id r13ls3466089wrp.1.gmail; Thu, 26 Nov 2020 10:28:54 -0800 (PST) X-Received: by 2002:a5d:66c3:: with SMTP id k3mr5477835wrw.123.1606415334154; Thu, 26 Nov 2020 10:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415334; cv=none; d=google.com; s=arc-20160816; b=GlWpbr+Ylm8Z+pQaKDwALAfrSf1yHnTgQj3dVRnPNx+kUqu8WpNTMJ9h3nwCGwELEQ +V80j43kSaXeeGVm3ebUqjayR7WjEMpoRc6wj++Hz3tPkptSeaKJjfZf9mD9rL7FCTEm L59hERH69b9zp1VCM6njQ4lQAspJzywg6QHiVntJoYRWygjZ0Yf/2nXkwNj61qOLkAd7 N4Sqn5bjtf+yTMhlUf4z9hFtZ8JCTF8EKbFGO2uvvkhO1Mwx+1e3BGEgFeZ5av2GSnsC I1VipiOo6ESu8yMuMpnthkzrfzKlYHWNBwGt+9e26Chm7AObJrd32uRVeg5AkDkt/Y5G 4rjA== 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=Vus/iYkiI3L4K+s+bL8jozuCgx9M8/c1fVDoKvrbP6U=; b=KLqCUvX1+QAuxPBeot/XLgcMsO0q5ZqkREciuzeEW4nV9KfdJtrr9NCGygmJJzZpww 9ZRcmGc1Wa6ZgU39EEln8RvXhwQX1umZveUlOFEKpxJNhfzYUqj8Llsyy1VuboL6HMIp dNIapJkA7+/1S2qgXub2KlsxoXk+HE51WyOIYhdwzT2Esiv7wFu9wKSoN+iEXHQYkWW1 MlApbR2uKn4EyWUi1j9eIMl+kYhHIfeUm9uGWAIJhIKeLkAkC8V5xPa5ieOa/f/Yycpj 7gTp5ThanItTOxViOYr6By3d3NEjxxexkAJfn8RR96ZZ5Zokh0WnKTZgwDZ2m3BHCHvm CDjA== 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 y187si226499wmd.1.2020.11.26.10.28.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:54 -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: buBg84mXU1HOt50zNsD6+VvBj+IwgYLWLkdgLexRsizrMXQDCNC6aBnAgoQWdzLbExmlhnSPJ1 D1PeAGdXlQxqTWGXdNVIk6uJcxC3s94KXy+ltb5Da+uFBgKF3x8pTZsKXn7WDDjiaH0gj9cAWt b5iyRwIn0QyWrS7C4G9oHBZSvrEVvyqbYBZAlOQjIFCS+M/Y0D+9O9rz84VX6be6rtgHC4R4OS NoIb6D4oVo1GHe55W23FLiZnQef+C/Bb76f2PLAV28uU8Ur3Xb2MbjKv8Y3tHTHTOwqSOKftzH N9g= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644671" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:53 -0800 IronPort-SDR: BXI0GYZ233dfrhHoNwEZhfk0ljUrHc3xqtvfk+LcZxTCYY0e7JAMX12A5UpLXH5RNk6WKeEB/E 4u6OZ1oSSgOVq1C2aUXM5fviN8/OqxO313oCytPG9xk8ZCRiW8D8DOibZ5B0HuBI0JvcGZTEL2 OUe1EhX4wmh2/PcSz1pgEfPNCljNUO8Yuy2Pvyj/6RgDQ90tx9D02660O7kNRcJixXG/cjJ6RM 6Q/qHLXlmdx8fiZHux57/8EqguU53qogt5pQGTaQdrqLVJ4EGTLgcerSkMCbULcBvKMXrjwBzc vUM= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 04/14] deb-dl-dir: Make debsrc_download faster Date: Thu, 26 Nov 2020 23:58:08 +0530 Message-ID: <20201126182818.7261-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448566571398762?= X-GMAIL-MSGID: =?utf-8?q?1684448566571398762?= Eventhough apt-get source skips redownloading of files, it is still slow and takes a lot of time. Instead, lookup if the dsc file is already present in the cache and skip based on it. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index bbc6f0a..0e2cef2 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -20,6 +20,8 @@ EOSUDO find "${rootfs}/var/cache/apt/archives/" -maxdepth 1 -type f -iname '*\.deb' | while read package; do 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") + [ -n "$dscfile" ] && continue sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \ sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}" From patchwork Thu Nov 26 08:28:09 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: 242 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569272oou; Thu, 26 Nov 2020 10:28:58 -0800 (PST) X-Received: by 2002:adf:fec5:: with SMTP id q5mr5515016wrs.245.1606415338109; Thu, 26 Nov 2020 10:28:58 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415338; cv=pass; d=google.com; s=arc-20160816; b=ADcUL9KD5wvKa4lUPg3ikCFVIJnfgxHqkhQXGOdy/wi191dQMixrgY+NJiDfQZ81hf LVnQwcKrpwsbUMFfFiTZsDlK0KgJD4Xd0FMd9koH5xO5vqHOzc1zhjL/w2pSU5/3H2EV P9nlBRiscoTgYwhYGvZd60TaLIW0ts3K1zGUcqjdcJ0zzMwLyA9Q4o5U+Ne35Qfk7DeF +eAXnAaLINTAno4Bi0Jt+M+XX4VOJV8tQgGKoDddTWVDAA2XbQbAZf6Q2i/3Hh5y6DOk 0etEUJfz8ZEPtxApSwFjgEzRu6m7GJaEuF5EF/4ex1DearlZlFBj0eW/cv0MUcyTcxw5 E4Dg== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=UYBCVkB5KrHNpWgdxgcXH8OOFnKJivPe7jifvmDkHEzucMDvK/g6C/4RsuOQGVjoKu wwUtq33NOOkjJpgOKCUcyaRJrs8ldQK9MYl7tmk14oVYjW1gIZvhXuEiAzMk6iWiJPCx 0HWlXSgyNx3I28EemImp9QF1y5r+x4B9m/+gjLgf+QM3cm5+wnKa7VzfC9Z5sgnfg6op rSkolioe8/x61rBRikUlunH3Q7C+gJ80u/9i6O3y25GxXIhHCiJSYB3M+Z0xg1+R+8Bc 3bEe7W/Xh2BNgV1gBhxvi/DmzRx+DzIdyy8C0wQjGruh9/OqQ8DPnhydmjgP1NS76LYC LgeA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=UA4DEX8x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2PH776QKGQEYIAMQ7I@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 b17sor3152738wrm.19.2020.11.26.10.28.57 (Google Transport Security); Thu, 26 Nov 2020 10:28:58 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@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=UA4DEX8x; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2ph776qkgqeyiamq7i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2PH776QKGQEYIAMQ7I@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415337; cv=pass; d=google.com; s=arc-20160816; b=ClLdxjP+sbMUqLy3ZgAwQG93Rl563S3RUjZG56b2B2TMjTtw3aML55/QWgGEgayzZ6 5JHvWuTlGC+MW8FlZENlasI9jk3NUND/F+WsjRUn0VUutFcaPbHjP09b6PKhfAtPFyE/ dvlKvknR3xwLwDtNjUQa7wvTu+c9GpcT6lqhMtYjFh+vKQ3O4jRQAmjWYfUMQamO3zvz MCKLcm87gM2i3lNGvfoV2aR0LgjudkvvbZzwEZ5NaZ1HxLESwuu4g1GaGcZZUq323T9v B8fZXjhcA/cdt11HVB/zqTwoI/K8xCk4zKWFlNtlgc9E9Jg4687IhpJYVQZcJH/lisfq 2f8A== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=WVAq7ZmTvy2kSVWgmA7m39vivGF3/fgFzEKcYJC4Jgj+dcLf+5nq/pt7eCZ5vyiesB jU40qjKzPtL3K7/vjdBFcjwLKuue601jOV0Tge5M806+fxIEPAmAt/sRi7BZweai2SQZ fT432fTy8yh5ZkPuxZrrPQpjaIGQn92LBqZ2icPqN9+LcmTBDrGv1zj3pRM9I3MgwfDZ 5sHH4E7mHJ8UNOiz+cDzXbt9P1JgEz7+U7V46pE41B/9ZQ9iEz/M/Q/bh+BLokMYuOYR Ks1o2fxxUpblseD9JJ95i64KgRqRmxvSYhf9M2xrfh3hMUnl3AMAPlwDPTiIXehOq50e eq+g== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=UA4DEX8xMK2Ks7Iq10+1EBq5GTtaT+UvhV6MR5qoPLuxZ1kX/XNFdVwMot+a+PLQMf wUdp/EqKZFQiGXxuXqHbecRsVOKs7yauWp8Yku3Arsf42rA18Bzm8fKJpziF6ooz5Lc8 IOt5Egj7htiRs7zpXMR9t/gpntrO0SkPmDOz+tV1uGrGcAt+S0L8M/P/4BA5Hwsc543P 1QdjZKRO5dl7c4vF7uLyMNw85dKznug2gy6XE/ZBqVGUpinXYLzRL4RfS6oCh+3mVdIc oUkJmUTNgrd/gM5YBjqRrim4HSOBhdwemdU0uQ8+rECRoXa2hXMzA5kldBGpFl2nFtXo yfaA== 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=1Yw+E5GJT3S0aJXNeXAAsFs2Z/9xzTLSkPolXqTpDL4=; b=HTtjbyORPCNGFqp4eTGXvadZ6PTB90lHU0Kp2FGnVLT3yVAWZK1rTs3os0DsURoKKn HjI+LpRbvNv0SMt8KcnS45z6pJuVrHrpjwmY/NpI05pluDX6qy+bcmDXvgp1LQMpXniH TMonGK+l0cmQXq4XYZ979h8F/6mzBVE4seOZoYK3tLv4PlrOskqBtHKIbwR+irmtlgMv Sirm0eMcsNAsvG8DzM85gwz/IN6oJu6JpNQNw5kS1XhO7JEhJijUUJayb9r1++sYL1lu AVJalxQTjriIXis+/oz8yf17n+xcQiHaFSa3ZW4+bcsGIALqSwNmBRz1dmQPy1vtc1dJ GRLg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530Umjx376E8ctojT617IQXdNfqOdfgX4C2cbaEUUpyGZs3c0Qm2 uEpCxJBI8dLdhIsZ8L+SxGg= X-Google-Smtp-Source: ABdhPJwI5upAChJUHdgC8tkiUt5+/sPLHMdtSne9trFJ6n/fgwR7/o5Hc3+pyaB+CUwPXZDbtAcTYQ== X-Received: by 2002:adf:b64b:: with SMTP id i11mr5417868wre.78.1606415337819; Thu, 26 Nov 2020 10:28:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:cbd5:: with SMTP id n21ls1357852wmi.3.gmail; Thu, 26 Nov 2020 10:28:57 -0800 (PST) X-Received: by 2002:a1c:f715:: with SMTP id v21mr4852239wmh.2.1606415336960; Thu, 26 Nov 2020 10:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415336; cv=none; d=google.com; s=arc-20160816; b=We+vQq1rBOTG55kqIA5+IawEvp87Z7RifuWWi0dzE3X5n24CR5oj0UrJ/0clMdOrmI JOdl6CRx4Et9kB8JGLJ4Nd5PXi7EfUvaWY1mYLuYfiRz/aUSpixyT/UTuVBL6xfrCNnW F0PBK7a95Yme+guOJG7EsEMUT7WNoKQddnThns5srfFV1/32kvnMl4iT8hRnpL2IBapa E1wKHBoEzAStt+VwLam1ITxM5VuoIHFBeTSf6Dafiy50CJL1W16K553H+E18D+0UBhbU qW2VZ3WkfIniDeeTgOg8q7CZ5FSJvfgJUNmN3qgxRGqfpS0LLbbQHHsyOlt0I7S5ebAd UTgg== 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=ayBFs6Y/fpnXas1NShHSWPWL08qY9MfeTuDcGAD8984asAAFmqDFxicDeJl/y5LzY7 +Z/sTiuAEcZDTI+ACAB9kSy+A+DuBbdtWeHG0aQkKVHZnD2nXGi3r+aBT5dxyQx16lbx SsytdfFwdgyjOQlR+p/EwdTEErwM9AxXAMrniYNTLhgWY83tUlzs/A3DRow2HUBBubDl PBX3uO8fOM4wLnMPZvHiCIK6XAGXLRQmwQqU+w7cOT++cZFHDxXrWlmpHhUjjHCjNa7U MnSDkF5PaKplGBDjNaoioXTWru5K/5uIB4BHCeTuEVk+wtHVgvGRwyJO45+XkMy/QvKZ 3ogw== 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 y187si226499wmd.1.2020.11.26.10.28.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:56 -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: MC34ZR4WDpuJZbzDkrRoIECofxJQUJkAcsji/v+PRGaWWx/jKuJ8XtVZzxfJgzAqbxXtH3pu5M ibBOOuBU306fHRXCmT5+ykl1yq2ja0h8sIvLn2iEpSEV2ifUhfb7js9KsGzHEMrhI83aFC7rJj vvD9dBO/+ags2RiwvALtHGu4fbWWFnSGMQqWkuExguEoMLbKLLjdnbsJtGknLmL9NiyNBxTmbC 8UwTk2IGW3Xz3ssrEyqF7YLjmgzo1w4Q07D2oL2kdj0PS9EiFflUKKyO6I3lICU5dx3aYqhNjh ARU= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644673" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:56 -0800 IronPort-SDR: Ur4TML6icwjoIeEiPgZVfw6uSyKnOaufd2kdN14FboFs4r2msWpcEI5azQO99PZb5BVoRVqXb5 +/TfPRmkThqjB8L1tSb1e33F8/XcmzgBZoqaj1UzZl5+f54kpDWowoHezsRfm/FWXkd8SnKLmC VsxXw/zUw28lnfMjL7fX9/jqkzbY3PPe4wiF2TDmyOMmDHhSzkzGEwAv7BSH5No2FEzvAlWjwk uZMIpRHpW61row3Z+Uso4vX2B8f5gdxuq09+WqkEIi7r+7egeZk8iaj45lPUpuU5JzaJiiudrN N4s= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 05/14] deb-dl-dir: Download files only belonging to the current image Date: Thu, 26 Nov 2020 23:58:09 +0530 Message-ID: <20201126182818.7261-6-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448569566065971?= X-GMAIL-MSGID: =?utf-8?q?1684448569566065971?= 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") From patchwork Thu Nov 26 08:28:10 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: 243 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569301oou; Thu, 26 Nov 2020 10:29:01 -0800 (PST) X-Received: by 2002:a1c:a9c4:: with SMTP id s187mr4793731wme.180.1606415341596; Thu, 26 Nov 2020 10:29:01 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415341; cv=pass; d=google.com; s=arc-20160816; b=nV1V1ooZOCFTf0tmWsDIICB3cusx7v/vQ7PXxec8KAjOoloPakKCBIEiJ/14AdZsNA NNdiR7T4DkgEf8lyF8n0EUkUWL6F+EGXH1WzLe7+tX9LLl0ucH5SjLlj5DaEr+iyGmFd PjanPN8iPy0RkW7rQ7wPdApa58QsjNg0gfw1eZXE4ouk9mz+8dEeK1XvFI6HeoUDZxbd kwmgJDwR8Xg5OUa47w4k60C5Rhb1XYHULJWd1fYop/TikuoAMTHtybyb/YXwlqPEYrlS aPPvHq9hWVVQkgCWiM4gpys0W/jSJoXx7KnG+YW7wxew0ns9NId3MtiSS24Tw6KC6L2V GKBA== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=OYjSKE7FkWqZE2Atnnl2G59XLvFONBZOgptjDpwJUFsJrF4joKnCCQVkOOlSwGsL/j TWGW9k+zCerzmPqA9trWGX/HF6yoxv+hQyZIMaZCaSuL2V//YTPYYl+eAyxXtpdJzZoi hGRnBfV9fELDHUoe1by1fpJQyvamNyZkcmEozSdaL9AwfCN2VTOoOKJwNpwIZqMON/ww hY24bisWvZDoVyO9DemsTmrpmkhncyp36JHXarC959+u39k0Vjhh9Du6AOnFncdvY2H/ s/pkaEi1mSYAtvfNJikPBUzTx64BVSmPHbirBAO4SFWsH2UpSpPXdOAtHb8M+Vd1chZW 9QQg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="dwt/W2qs"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3PH776QKGQEX7G7MIA@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 p10sor3246205wrw.43.2020.11.26.10.29.01 (Google Transport Security); Thu, 26 Nov 2020 10:29:01 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@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="dwt/W2qs"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3PH776QKGQEX7G7MIA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415341; cv=pass; d=google.com; s=arc-20160816; b=ZamW/5M9FSjXtTxZn6z0x2HxumAKoEHSZC6UMdFXS2wvB7388EbfWWGvkmqY/8X2BS WRqhIbtc0SKZe/p/qL6xisA3a3SttOS2ubErr1O5I8JFMtpGCIP0aewBiddsPf9ho3y3 JZWwLJ2zoIypOMoElT/ZyWhDzUVWUC1zGG8XY01n2R0lNtLDrFQH3q2RyExyvvlgY4I+ thYQ4gGAQhbTZdQv2lQU5JohB+xnaoLP0tt2XxZ8HA59u/wuNncnjyuWYCnHELtPrSwC ElczmwVA0+DIV+Ii22GESso8q/1lyw0I+V+FpCI1ldI2KSXpgnGQqmq0RfiWUMCS+SH8 Y5ZQ== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=O7l+t2eoJn41cqZ6WH8RmyKIF7rnuSTUwQV01CzXUQwKHe7xdWDLrdQMqES200bh1d 5Ej7uk1vD5u5CED0Pm5GLVQSjoUtlRccDOejlTwPqdGKkkVNtjMokhEPdBFoUiRUB0tc MRC8I2/qbNKjZs+GEblhjWRM+oR26+6Sl/8jESTUoO3VmVucQal/uJ1sXYwqeft3EJV2 z2G9g9uUvthP3y0F3Hlf22qFsBsrQjbl9twgB09Uwp1IW9P2hZOXLYSslrUZrCjqluye 73BFumtIEjRBXQ6jOrRXFMuUzv5S4SF5aEMne2BfHwhWUBfRq8MFWyEGheUBFRSby5Vx gVtA== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=dwt/W2qsvLqZImaT48yCYiW9Wx7DNMjLKUniH08/45VOyHAmRorUfY8tBrkgvHJg1V be0aDw/C85AjQCGmt1MRZSkAJWU3xvbCliwpqUsVG+Vq3aWv2xkDSJLLZqAZYO8NKxlq A+CeBEefE2AAyXIEnkMOp6tP/kC49wgFmsg3T0RfUB7hyaDhSi2PE6iUA7K8LCWGVSzh jpBuSM6tCaaY2EpWeJj9RRXEa+z6VKKCpnqLycN0GBe0cRguMcDhx5qtZpI227wmWmw7 SgzIZMclfs5dbzg8X+iwIKeOMNi+sDkcRRdLEKuziezBZ6BySs4D2FnyQqbqTsMY+0Hp Lbcw== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=Quxgsw/euoa9hWd3DKhTPR96gxIwaGGCtPZKkMjFilxU3ehyxNKYXPkOKLwCi6XbsG DoScEuGpj+jWVb20JPNzUsVVf96Ry9hMfB3CEbHh/bi2z4wroLfIPaBJ4SHGp7wgKA8Z 3BaV5NFf67d2aNTO2jzZSMA8GIPoIyamdEOXY92A9mdOU8o15BRJyCOgbNs6VTVAS4f3 nMG9s9bJzGJpx3gssIpyokLDvfV5keqc+Czd9hwNNew4y70gE/rrg+cohI5uYhexsF0m 9uP8OM0SwpzOBLUvbnMLI5AKiJeJdVRPlWw+oCtnmBwmH8xiLw3oKSGNuE7F2L4Kc+hj RT4w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531Z1YGJtA6y67fwPEsB0Eq6LocqJh7XtcpeH7YMnn7fS9MbvUSE +Bey2lwsf6LwphewSJIIcP4= X-Google-Smtp-Source: ABdhPJymnF1ecevC4XPPDzMsVlR74AUzAmdF/0IvXj9jcYcJqAWIRWrLGAO9Gl54rWuaUCVDdH4KGg== X-Received: by 2002:a5d:44cf:: with SMTP id z15mr5567874wrr.353.1606415341208; Thu, 26 Nov 2020 10:29:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:a4c2:: with SMTP id n185ls1357614wme.2.canary-gmail; Thu, 26 Nov 2020 10:29:00 -0800 (PST) X-Received: by 2002:a1c:31c6:: with SMTP id x189mr4727500wmx.50.1606415340336; Thu, 26 Nov 2020 10:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415340; cv=none; d=google.com; s=arc-20160816; b=WSiEwqr+aPYBGu9f2J3ksfAwFlUixRU+ZVacTG2l6/7suQPDz+pNUKgEI39bssO6e5 16FJBtDsEdQ/4BqJOzy1mvqm2cO+nsegZ3cECrSrH58orXXLUw23sMwmvJyiexxUm5Ed w4MO49EDtDgHrEyfpFXPMVGOQO5VxggsOqtK9MmjkxVP0aJZgYBOefDGla9uWngD2s/9 L4DP8ylr55n4gVnt1WNI4cXyJQCHng+tPOu0UpksMnhDu7YDweRa2xRkezQvy29TY01z bCmh/cqieDcx7220o5Z/Ia+Cev7TZnrLHhnZT4rDzGkCp+ie4CQem0zYcl+/LItQZEFe jR/A== 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=Pm6IAkSMDMZ8SW69PBUuWuZuVdTSuho2IhTBTP+44B0=; b=xFNHRVfVS16naSD0VGXPRn0pCP30qtTJMvrXMTt4zRB4Hbt49mVNDTMBegUigLXj+N Y4iZM/UNRJi/rd6Yn0GtNxX2aqxu5dQ7dayIPf1W+0wRBCw24YLoT6zL+w+fDl6WFvGq WInrQrIuKoWjPEqxaNNrpRqDgM3uJG0l94p9WOpSFVMF5MJ+bnG4s8By3PrtBTAuWr5p rCVKlq+ujKdRhZyT8a2YFWtF8OZAXPfDKVL6FBOoqfdnbb/4dfdE0048cCP5ubs21hrX LslCsN8I6ENEjIEk8+sOUEAT1fCxTXeIe9oigiGF0CLnSnmJDrmc0ayyyjdNPhlfNGEK YF6A== 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 y187si226499wmd.1.2020.11.26.10.28.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:29:00 -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: MUO2bO3h0xAcDeJ4uFZteSIZXIVribOAEBJaV7RjijLdcvtyKiwDX0MMC9Ti8qrJJQH6bDtl0c RpMAsALQxX5UQTd4nXFlIa7LEgHgd8byinw3jWhWq6or4E7f62/o6fo4WTJ9Susw3w/89ABpJF 3tKBiDWHlt0cnM9qfP8QPZCp5AVZuvTUFlEoS3luboZeikO1xE1aqVmyRuDvyb9qn85vaCZ6OJ iBvc7GHoeyiX0wugd7Z8d0qVSja30IOrSTcs5Cd6Mv0JNAwnSg00W300k8pU/jaHNLwCEDSpoF SM4= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644676" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:59 -0800 IronPort-SDR: nC3PqbzfU1glXyGRKUJP45JLxywlcN6xyZZPrwPmlXmARlH8ECdRcSMQQCz0AhhKYsF4kKIBkF PehP3fIcIzzvSr0tqTCMLT9Vbqz6VsPNfopUlzzqPsJFnFAUVl2/STCxlIJ2YBjup6ns8zXal7 96y+RiduOorYYZuTuyv7VGM+U63dfNInB+397gTY+7LAGAPjWtSTrK5b3pCHXf9CQikHaRlH/O YeqWC6wfH6bYgdJJQua1zM2q43dkkYNBR3jg0goJ/bbxK+fJCKd4QnKH7ZLSGdXfELGTQY0Aww oYw= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 06/14] deb-dl-dir: Factor out the mounting part Date: Thu, 26 Nov 2020 23:58:10 +0530 Message-ID: <20201126182818.7261-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448573360304950?= X-GMAIL-MSGID: =?utf-8?q?1684448573360304950?= Factor out the mount and unmount section to separate function for easy readability. No functional change intended. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 410befd..64d1823 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -14,15 +14,30 @@ is_not_part_of_current_build() { [ -z "${output}" ] } +debsrc_do_mounts() { + sudo -s <"${DEBSRCDIR}/${rootfs_distro}.lock" - sudo -E -s <<'EOSUDO' - mountpoint -q "${rootfs}/deb-src" && \ - umount -l "${rootfs}/deb-src" - rm -rf "${rootfs}/deb-src" -EOSUDO + + debsrc_undo_mounts "${rootfs}" } deb_dl_dir_import() { From patchwork Thu Nov 26 08:28:11 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: 244 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569338oou; Thu, 26 Nov 2020 10:29:04 -0800 (PST) X-Received: by 2002:a1c:c304:: with SMTP id t4mr3955154wmf.53.1606415344410; Thu, 26 Nov 2020 10:29:04 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415344; cv=pass; d=google.com; s=arc-20160816; b=kAiPJ1QyPxxPbVseu9VfRnWmsmBEelg0lyBN8kK6NK8Et+SKSJOYtS4y1L1Aq4hW9x D7htGoqAVrIq9V5ljpGyKwPaRxq+nC7GCILuL6b8Tx38s8b0lZcmRVh/QT6IV/MZhahz BG9xkMZMa/WGOe/zVde+tNVVaaa+7a/aCyPSWY6fsY0SfKlkFXkktX4YQw8hg2ks2fFn L0Sn0Q82b/4csldallsXovkdP4IfZ/wGZVOkwO7p56LtO+4IevRfpdo6BdlqM3gsOMqc VFokSxFJXF6R9ZNkowQ5IqwG6zVutFjqvz17pF3yyZ1dXy4+uLf1tiERWnM1ki0NtJjn RvCg== 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=rW5sDMn2+4Fc8rU5s5T4fLubju5BwU8M1DDxuCzeo8c=; b=BoMwtCYF9RNctV1AV8f1M3r0U0gh753Rwu2/vdUFn1SWgOrS2kx3lIavhKctSz93Sk EpNPHzZ8TCxGM40wZyq0/ZoJRWyGOJ3WjCEBjioPe826CV1EsJ5AlAedtOVzRYUWQ55C TUaydZxx2G+8Sf/8HbF1ldb2VH6wBCbBIg+ohOrRxFIzhVvRooOmkG6Nkn1fHp3SQ2jn x1OnIyWbJBh624LJqI1fOsGBxi0j4es+5uHqR1aqi2oJZpesYNeuyPMLY8kx84AvQVZi LQUZT9Xvc0DurAK4dz0YM7cJc0Vp94ktLFcxQ7FqeB59+0wPQYwmkTg7V/fokTtZTRnL SI0g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=fsNDP+4m; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb37h776qkgqeu23ctvi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB37H776QKGQEU23CTVI@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 p10sor3246269wrw.43.2020.11.26.10.29.04 (Google Transport Security); Thu, 26 Nov 2020 10:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb37h776qkgqeu23ctvi@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=fsNDP+4m; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb37h776qkgqeu23ctvi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB37H776QKGQEU23CTVI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415344; cv=pass; d=google.com; s=arc-20160816; b=gv4CBJxqriYk0H+TI07eDaW5r/RUAMRD+FSiqdqQdhoCLYi2pP1MvZLQ/vi0sAcu2u b+NlyIM8olBui0jO1TFUsE5IN2qdnnWKf1Oib5bfoUHtY4Dpds/EeE+8nvjdcpm8zaWd J3/9Y7D+URVHRs7XpEN+EeweagaNyRFCw/r3VcVtOiM3EhDSKVL+un3YKXjDan4pz0Jh BIxrl6Xm5ftMNUvbAOGkgJHgnsSJdFQ4IJv+yXClkjevjHQJTkGDxBXvkBe82Sl2fzZy rCNGGuB3zQx7gW6adE7YImaGFtMKvrQqHTCIRMmeBxUkSeu33a8TKloXSgVJDnecz0cK 03PQ== 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=rW5sDMn2+4Fc8rU5s5T4fLubju5BwU8M1DDxuCzeo8c=; b=JYhX9TI6oI+YI43Jdz/McsBfxanG4VwDHGXXey6q4olYHTYB1eLtxnjrkg89t1FZCv JOwp4EdK1kgrEIMN7JaWQknoNWtW6hB3b0b8ZMlaBDVGVpD4TPf7jJCTyJSaXSL7TH0N Sl+0GvzSBQAWO4Kq9I3y19E8hXrWQKJhJMh89Hbk9ZucT7gEiv06UnQ5POqc3YNnyxgU 3Aa9dFlDolVb/2V1Lx8cuY4j4nFZR+gO6WtUmB8mJAHEuXM3TVKLePkKxROVM78xE6wg iqGVJwkgME9WowHemVK3T9q+bO3WDcjNAepBx2gUMLTEQN1pTxlOoDLlJOgzotflAnxp k61Q== 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=rW5sDMn2+4Fc8rU5s5T4fLubju5BwU8M1DDxuCzeo8c=; b=fsNDP+4mv54MrTOj6ZFGJfveTLb30cFI6fXedsz3vsALWcU+tOIMS7BQGD8sIfA224 rHcHpIgj+0QjvJXdX2nc6RIJO6FfXaf8NCaXgM4Y0uMmvD3uqw4lfmiYoUf4wZAFR2yn mHoMea1QhSPGtJ1ojJrT51U1ghNk7X+phlTE9927oed7D8UAKSefgQ8OGwC867AMuOos GDleh2d9jwaWP4NxrQ9x69JYDGJnUkVhrLHco+En1Nojr9tvNr59kkGNEiZ7GYjI+rah B9p80g+JsVKf62ABAcG5HfY4UPcoX5H3MHVEccHwnP2aZBb9I6vaW/p5/UBl9DDJdJRM yW0A== 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=rW5sDMn2+4Fc8rU5s5T4fLubju5BwU8M1DDxuCzeo8c=; b=CmekQtr+kEO4+NJpPjZpjytYMcSxiK0BD8A/CEQ9gYvkZtLqVxV6ORmtQ/emK820yQ p+/KkCShIqcRNNZHnybg7Ds348Qg2dwnuKsCStlcNKxZt/g+Zn6y2bRRPdY5FBw2C5DC N3slwXY5+80M4toWRanbrCCbdl9b0k3Kzp8Dakwvpb2YMO34HJBLow2qEW6GoOe9ZO0p AjuGRQf6K/iXmMCVLXBYF7oKtZOkFTGvovJKxU7GOGIPEYKlrcYvsO5I7IFb1zIJ3sXK xYap11Q2MQtIng3oNFo6YARgXIQIJlHvMnzJ/OsHmkCNkH1nRBOW9yZ+m4wD+d2xW2yL t2hA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5336FQZ+Au6f2RC1MVhxAiy40zUGxTxNSj8S4e8QbMr2Ge7oQYKK sdWo3DZNUrH6Yj/t0nXkLBM= X-Google-Smtp-Source: ABdhPJzkUIkVPRMMalP6h2+YXVqm6C+qqR+4X4jR+G9d9qs0+aLCRUKU7SVkMtj/O8LS8dWwz2X8xw== X-Received: by 2002:a5d:514a:: with SMTP id u10mr5547529wrt.312.1606415344125; Thu, 26 Nov 2020 10:29:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:a4c2:: with SMTP id n185ls1357672wme.2.canary-gmail; Thu, 26 Nov 2020 10:29:03 -0800 (PST) X-Received: by 2002:a1c:808d:: with SMTP id b135mr4672215wmd.45.1606415343351; Thu, 26 Nov 2020 10:29:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415343; cv=none; d=google.com; s=arc-20160816; b=o5rzTulR/JL8YFsxX49bUzqag3A3seR9TWOLWKCzOFUTwkx+F1eXDynWW6XBeBWdQx HlQPN7TlfkbYDjhfVMNa7644ZrqtFU2hDQk6gVM15UH4vJuEG/kFySaDT2c69TBVvprU lrh/ziq7W0zn9WNKbasjaSudCOd818eTyShnnSoOJFTt9t24EM5OlXvKPwO16vSfio2X BLiz3wnpV4LBA5PcPESHk3U7PREYF2fKiXxOFttGOBc8wnizbL2kNmeoylo9IqPvxsWt 9XXpP+8fp5+9odZlmJzt+CCXCJ9rvOyuGfcwJXjyhTY3jnQw+2Ol9Fl9+0bRy8ZlyLj6 IFIg== 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=REW3bioEL1FVGVQfTgrFbHFpwynA6jBg9eBHQXcWQaWEv+uYXnzgXbhdA7sm28WZ3I AAJyGkHE73Pv1KYaXjoxUPudcp/KGyt5cY5gGHusaGdAHUjKElh/NlvOgCR3uvZ/9zRa xxJSZg/tv9u4ZS0VK4eDNTdstQiZWvEKuFB0ruKOsROa05p1m7fCMukyVT/6Xutw7QzT /zpqX4fDLYmsT07bvbzU/yIHGcrhwARGxig6EgVbjv95ELR/qLe/oGWgWGbicNMBp1aN /rLDSiLol5i6eDm7xEdgV7Hc+ZJO9yCWQOes2c2JH5R37nuHj9qgVjGHT+Ghu+HD4UDQ bV4Q== 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 y187si226499wmd.1.2020.11.26.10.29.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:29:03 -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: kANV+D5EosgT+Wjer7igmQEDX9QxNt3bImqyzK/+mAXA65XnV+nCOrCFRdKIZ+eFjKPGqb1jo4 LrLJVWCGvHHaLuDtxGAx++jVa9Qye87dKZYhH8BxIAdLt0i4+0Q0Y9aIIGZTD8lw9exx2I4+sv 66YnEDcPaOt9JpfKhDyxyUk4DqMUjQXAsk/HwoBpn1rN2f5E9oxsxOJU1jGPYwB9KVacjNjJUR qPu3o+1vm8ByPntndxjSoyq7tUPohhrMYXrefmI2BqcKeOxMbWGqwY2cV92D8o1FmHJM+dKRIX 6QQ= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644677" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:29:02 -0800 IronPort-SDR: EbtxfevqnDUKnUmS+VoyzPOMx1sVuXqtocERArTRvBdfSr3zNePq9f/QazpxBgEodMwnD4TSST nApcJzVA+swiCq2noNBWryjV3uDiFFpLYbra5sl24jQIwDvlum5EKIcSQcJ1TylGXYVCKTCPfu 0kgb2IW/zJgXeczIsY1E5R7vaCgkyBZlUK6zee8Ur5W+Q6LRmyTDKTPj4SW53m0gqa2GN3VjAc EKFqnwKM9I9FUvZHoyOMPDtt/oOcIpkXqEGUCIFoftuQqY3jWDa6XAELuW6Lv/lp3TKS3vFRmN +nk= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 07/14] deb-dl-dir: Fix skipping of removed files Date: Thu, 26 Nov 2020 23:58:11 +0530 Message-ID: <20201126182818.7261-8-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448575961491291?= X-GMAIL-MSGID: =?utf-8?q?1684448575961491291?= 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}" ] } From patchwork Thu Nov 26 08:28:12 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: 245 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569356oou; Thu, 26 Nov 2020 10:29:07 -0800 (PST) X-Received: by 2002:a05:6000:143:: with SMTP id r3mr5323755wrx.331.1606415347335; Thu, 26 Nov 2020 10:29:07 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415347; cv=pass; d=google.com; s=arc-20160816; b=oUi3sKZiaSn6QYmd7WSwLocExcoc6eZNMuXEAUaQhJqdKDNTnoZp9N3swuM4mE9PY5 NoryxNMtHHW0pTJi97pW53JX0bXLFQJuz7BRsC4aASFBD911TqHW3ZKC0pdCpWdKuXST nnbgt/arCjRkNoifKIlBAIgVzRfKE/8QGcEHNKaNyvdmO6Euw6uWkzXm4sZZao23+kk6 gsgrb9ayFIoD//9+YBhwG5qkoqmd4du+ZgObGLQkHnMB97Nnh2vmOZaCgNJcjcXKSwl9 ogNS4QVQ4aFuM0dSXv8K0quZJaOcU9x8xcQtRDcBX+UyoQ06qhJ5Lf6UpDH7z2W1O873 x//Q== 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=ToNUlz+MTe7b9Z1MLNt7oxatkHu467vNKljpTwkqGO8=; b=nndz7C/mMBWbUMcupBAVWFlXdjw0Nli91hnFcSvnRD+8+5LuhywtMdfwWiFxFSl110 UlQiXDA73Ho2p8v+99zi2zgoyrXzhDBnJlCyZZtlFCw9s2O04DSN/PNwBkQfzTdKi+X5 y9ytX318doUyZ5+LY0QzHA/GZyM5QPJkZDN/sqGi1ypVBRpuCVN43R1U43IUOMIuqQBm tIJ5l6PzI+tV3rKv20+AtGBRcJpXrNzllm1wYvTb6katNyET2ZdrOAgaDU8MLRlTv2uj ZtQmVyx+RhXR4SHq4rqwFkRUTNiGnZRByl0lvMmZuYtBmXcEU8+hBDQEtwGpOMb+HA2s QCcQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=eIfW0Oil; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4xh776qkgqe435oxfi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB4XH776QKGQE435OXFI@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 i18sor3180853wrs.26.2020.11.26.10.29.07 (Google Transport Security); Thu, 26 Nov 2020 10:29:07 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4xh776qkgqe435oxfi@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=eIfW0Oil; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4xh776qkgqe435oxfi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB4XH776QKGQE435OXFI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415347; cv=pass; d=google.com; s=arc-20160816; b=D/HKjA6/HRBjPcpkTaP+3Wt4UgK6pcYN6uSfkUXPsMU559tOumhBPqVs3QtSrBYvbn MWDqzAX1tOfjLDd7k6UV0f5KPLGrWXbJNNeT38Fd5xyMwH5t6S/p07IWMOmaR7PHSTYV v2EuhOvssVkC26wuWHauRru/J/jLfDuN2/ru4azHQT6yjvroFvb46WbKw8fAr+XZHatB bygS8QBpYtNP7M3l7wvQ4uTVsN3XldvEV21edtZ8yLYGypQfiDYLqgWvc6vKaOmQ3G6a 5I9U1agFFp1nwZj6ijZTP9wj1vniTCwAWKcaj3dFDvcZWfXEJ0PW6+ozMuWDCBr63yEN DMkw== 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=ToNUlz+MTe7b9Z1MLNt7oxatkHu467vNKljpTwkqGO8=; b=Nn1/nBwa14bBLwQ5NTS8NHKjOLX8LnPmpVWQnyMfKYhw0Tk11W+3opB2JThCAUl8t9 Sp+BjXLADMYU1SaofV3lwZPZYH2E+kop1MjxXJPbgnM0oWSho2dnybEHYjUqPYd5gLA9 QS6BdZtw0xIMaE+48iq+G3y1usx0x/H3llobNKqKxErMeew9wqGwCmUFFd9StEFhXJs2 kTCZj0K959N98AYIw4T4gY66lM0ViERxfP8OKWa8Ifd8ASV51KzLoqOneH18e6J7Omzr feMwSi1tZabVKIpuD6s51PzAdyAoaG+xV29IKGhAXtMHf/ASRpukGrIv8SnVQRN3sgwi iJsw== 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=ToNUlz+MTe7b9Z1MLNt7oxatkHu467vNKljpTwkqGO8=; b=eIfW0OilJtXb60O0RJfGDF2tC8gqWWkm1lOnzXj36y6LAK2FSb1kmsiBYaXHpvnZyo GDtprPrII5n9f3WKNoYdrDVCy3uvXFSpNoNCI7ZsAOGHQFsl6bSqm6TFDzbEQsSphafa 4Q/FTT+FmOzPC2RDq8nu/ovn7dvEoWGSURESIaivunJV14TjeBRbBsU5FgK2dOPN507G 7XBq8+yU7WvrpPSaULVWJBJqkUMmug5pVUNLfuhThl/zdCo0sll46ALEWoRsuhovwVQR DXtpS+uB3rFgWPNpFhyHUxCxZeRl3EguXdymGDEghr730HtDjP8Ah1OAoJXhbBsAxErh O61g== 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=ToNUlz+MTe7b9Z1MLNt7oxatkHu467vNKljpTwkqGO8=; b=s4/DXCHak7lc0ekhxOxraFYts24HV0b9fBcbghJpmghI47CGO85FoqtLgqxD/8ohV6 JB0bl9nFXM9qgCFSAd8uvce2sHAVfDDrEOB09ddqIkBqdKFCrcZFLr9VIvJWJpVtzzPj wRTkvGUmrJyXyL8mkX4b7b+OqE9QSqLutvMmpip37Jp8ZhKJMuEcbYh5nPBuG3Zca7fj v8WK0SeRU4YE3OCCtigsFTtYMx3ga7+tAEr7boieNcvPxNnbui4+T1iwooxkefHvnEZS lZ1FkiaCUZV1FB5ZDZAk90eOC9YxnOdLGxaCB3Zkvxv6naBRz4sjLj1BYSeNdFXfEha2 bMaQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532gYCgghEv9U64v3TwdO31QPAT3aNsmhkB6nckrHCE42YlxVT5S FlFSfR09GRN5u4VqJG03iac= X-Google-Smtp-Source: ABdhPJzx1Gpu2TxdPyMhTiwYGQdgsQ8EcUdXbJV+ztChfYZlv1FFHv3JrX7O6KsjDmZAb7KMMhqz9A== X-Received: by 2002:a5d:488d:: with SMTP id g13mr5475686wrq.274.1606415347096; Thu, 26 Nov 2020 10:29:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:2348:: with SMTP id j69ls1362492wmj.0.gmail; Thu, 26 Nov 2020 10:29:06 -0800 (PST) X-Received: by 2002:a7b:c34a:: with SMTP id l10mr4694004wmj.125.1606415346298; Thu, 26 Nov 2020 10:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415346; cv=none; d=google.com; s=arc-20160816; b=YVjHwAy/NL3lgBed4UNiwt/ILE6OoJNyLcw7X5KaeX/jeErn8rA85WBMs8GlIgn634 bJV5tZd+lDXMFDMMMu+nglzvVAXbCItDY1ejBt+md1uYqImUseHprdXWxj3Tt7I3OlyW 7Sl9jy2aIOfhFPH2A0uEzSstJrBPCSU+njAIQehaHN8d7M2dWO+hjUARqpLoh2Q4s76A zCgMsm2hUXnW+UAP0NMNQaDw9mg9uGUAWKdVSSfkw1rtHRUWUXIOYmCmTa54ORPGKuEi czriD+FYfmV9bsnmH97fVfr0KxxaICCv2ojqq8/13gIs0MA6X+nf4W+7eDgvY/Q8B4ii RRxQ== 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=bjyc/AnITYqgbyEIv4gnVUjhB+RwoaQ68TQ1OhRyz+c=; b=Efkr3Q6Q41CO7krugqjxBOmpQsEXs/oDyZ/bnBEhq0eKhbwmo1me6SgiQ2oo5reAF4 24pQIZ9JjVRdQqRgKHfVEzzmtUvctgEiyHdtp0ZOWtNdVVQ0qIli9RT9vzIudrw3BAa7 HV0CyQe3omaRB68n/w+PbypnZF0hioRX4VPrd0yERM5bao71XpQks7x+kt/MkCQx5+D7 kghX8a7V9vU//OvwC1lFekA3wmANpdvNwGj7+brdHKQOhSNfEiYmaB3KTLFq7NgiKm5F VKV8av67bCPcRjpjmMURXZalT9pfElJ/YNRfYhQMkMbDF0DvJXJUg01MIh2F7nlbabgn DHiA== 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 y187si226499wmd.1.2020.11.26.10.29.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:29:06 -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: /iCfOyy2zuxXjcF7wtffx46s92VI2dcsZWMgdRH7wtr7AHC2xXdTUSljoUF8k/atVo+MdQJLzq UzGEeggdnFDm+D/pjJEllTLMThqf+UsehuL8DRjCGxtSLUlEiK02S2kdLRL93f997ffg7nSCtG AKhc8SM8xUTTN2AoGR+9QSdnibmEn5THhUhVE0AxMTf86EL9o/jvy9/IvH42StG3xe93L5UOfN vk4/npvmLaS/jsXYl4SV7ZA4+DxnBiI+Lv2gFr/b2lNe7R5JpPVYNOuG9POfdMyi+piddm3RZO 9DY= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644680" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:29:05 -0800 IronPort-SDR: meZ54ljynGCJS5wxTXmc+76xojjQUDWtOYcBt0gEFhsHg46jeLn8vRKoh6XxZtWehN9RTQg3ZQ 8+wnYSknmI346Qagy4i+iTsQKOmzeqDqIpJ98mAonwwYJPb/PgaUNA3hae9rASYKX5dsIqH5Yd IPN36HukJmD0W0nBW6BxbwsWmasL1R91oZU6nlKF8E9KN1gckJvcvFcA3+qmowE4uQBV5YOQYv buYkRaHGLgK20bRaP+x1iR5/153Ksy4Th3bOAN6cIRFMO5ayGGmU/FZ6kZpt2slENeV3HmM7Z1 5P0= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 08/14] repository: Add a sanity test to check missing sources Date: Thu, 26 Nov 2020 23:58:12 +0530 Message-ID: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448579449304067?= X-GMAIL-MSGID: =?utf-8?q?1684448579449304067?= Add a sanity test routine to test if sources for all packages are present in the repo. Signed-off-by: Vijai Kumar K --- meta/classes/repository.bbclass | 10 ++++++++++ meta/recipes-devtools/base-apt/base-apt.bb | 2 ++ 2 files changed, 12 insertions(+) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index c70138f..7b6e47b 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -96,3 +96,13 @@ repo_contains_package() { # no return 2 } + +repo_sanity_test() { + local dir="$1" + local dbdir="$2" + local output="$( reprepro -s -b "${dir}" --dbdir "${dbdir}" sourcemissing )" + if [ -n "${output}" ]; then + bbwarn "One or more sources are missing in base-apt" + bbwarn "${output}" + fi +} diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb index da3e32e..8940ae8 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -66,6 +66,8 @@ repo() { fi populate_base_apt + repo_sanity_test "${REPO_BASE_DIR}"/"${BASE_DISTRO}" \ + "${REPO_BASE_DB_DIR}"/"${BASE_DISTRO}" } python do_cache() { From patchwork Thu Nov 26 08:29:48 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: 246 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570266oou; Thu, 26 Nov 2020 10:30:17 -0800 (PST) X-Received: by 2002:a17:902:8506:b029:d9:6dd:45ea with SMTP id bj6-20020a1709028506b02900d906dd45eamr3727372plb.72.1606415416979; Thu, 26 Nov 2020 10:30:16 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415416; cv=pass; d=google.com; s=arc-20160816; b=G/w30Lc4pDX33h9p8ufqsHKIBNKfTxJnyLiPydcRGY6gFkiWBl+VOEV/XiwnxSV0vQ +rdFQWNdjvDShD5dmDQRqBuCSdJvH8ikQQHCCRV/RR8Hm9BB2YyzEFrUHcj88fDyzpXf bIdP52sYP6qCF2YR5If7DfV9xeE+q5CyrVXsNku+NYYAK564DlupldXfOcjCyBwOtCsL zlvGtK5iPoeKKMXBlN29IXnaJ5mgjgD4Wf47p5V2sPs+wcUxJ67s1UQHY2Wjkce7b3Vg cEIoTLLQ2Oprfc96KLG0RP2A1k2jB1Uo1DqFT7bak06lFusRJ/6GnlztbouheG5Rmu2X BmVg== 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=Sp62LBmXTGm/+C8LvVg+7LXLAqXTLmDBWdn83Cbmcms=; b=p03ypSuLKrklTUnbodNlEabLf5lKrUyUbHVTv/V5Rlu1i0zcUAlsJ1E4E4suFADQ1N oqzuGH7HGg7ZF7fd4usVXHxYmUeA0FhEp105KP+IUGt+EmAFuPKxIjURMCFUUcxDs0ic Ags7OWjjkXfN9JLZ7ZLscsf+shW9VUH6uEntFUtMl8f6snNnjUm/a5LLQq6wu+tbfr3d ashBDvmjCObB9Gzq0mOFh1GecVJtdTQ4Swplpky6rT2/CiMduM0SScsua7EyDf/JOx7E 0f4pdaRDuH3IgNvmW7ASeNb+hp3/qRl7HZCYPelysFQY3mh/eP7hV9zSqV+xOUE6G2nz CMrQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=XajWJ8FX; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbohi776qkgqepg2lgwy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBOHI776QKGQEPG2LGWY@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 k7sor2719886pfu.26.2020.11.26.10.30.16 (Google Transport Security); Thu, 26 Nov 2020 10:30:16 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbohi776qkgqepg2lgwy@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=XajWJ8FX; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbohi776qkgqepg2lgwy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBOHI776QKGQEPG2LGWY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415416; cv=pass; d=google.com; s=arc-20160816; b=O+rNXf1oshNfJwrWB7GZYhQILHzxyr5CPi+rCZpjuDHnYnHR3K9fyv2FRJk6BmXAge Gz2njgfvig/2Ahg2je8ZV9QNr8lkeO/2kKwWpSsIdfXDtniNMSo5zKUYe2HO+GBsYxIm OSk+/QA5lIhP8XwXh472AHBn8lth2+pI3ixc3N8O4cQpY5EMW8myowQ2wz+cOgm8O8v4 nAx1IcDoDGczkDRAD1J69A/Cc0C/jooXZEmyOTXeeK6kZDLo0V+4DQNAsRudJldfZ+Xj 6RNwjQuUT7/P4VlGw6ELpheIr1F16tKvsvrINuilBw+ciNA72fCJo0CqL71ldnSjWkgJ urBQ== 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=Sp62LBmXTGm/+C8LvVg+7LXLAqXTLmDBWdn83Cbmcms=; b=XTIoH1BZhsW7OMYtz6CpVO2dvJ5IV+CkRdgSJo20Jc5uKw5NhEOuOMmxFmpPTIZWXt oyqZQZUzfbykpC8E5EjpD7HyLDzIAw3ljvYOU7wzT3zGFC6haDGmLjoBdW5OFHUhwkDn 4JP3BZ4wwVqdkFHnQgp1X9oN9/psM8wwKaR2Rtm/JwEu7Ygroi4NYOjfshUQPw+LXaPS CwekXDuxks/PfR+DcW5zOZMN+aQxqG4eLipNuDLgFvuiuc0dVTuZ7W0ep8/R53DhmRVv 6UKs5cdz+PiJPMNerSYDclrbKJ/6VJtS8VrSPnwtjOqYpJI7VZfeOW0Mi5YwEkg84Y7f C4LA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=Sp62LBmXTGm/+C8LvVg+7LXLAqXTLmDBWdn83Cbmcms=; b=XajWJ8FXOBAMdURmnqLz7R3OoiG5Z7Gza8j8r7JWBwIDURZtayXNIH3ZHfKoVxlQsi NS3hJlJlImwn6JTWYTrAIPUHNK+d0t+qS/NNFjam93zGyZG8/LMaVfxwr8g5v39jd+PC XeYKvSKK4rxhv5hvCUeznd0zOjHoIcGlbSwf7jOacOGhs8jJJjA+tYgrviOEm31rLpNE IiT2P7KysAyMiyLaIubF+BauLIVHQwQ2PyoYOOt45Z18UdCA0jnHrfsXUIXDVWo7rEFj PutHBbrln4Kn4usqsRF/ln11MV7f84p0KKHtZKUci+jOwFZqXFiJ1m/nnY+kTNo5e3DV rKKw== 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=Sp62LBmXTGm/+C8LvVg+7LXLAqXTLmDBWdn83Cbmcms=; b=GFyH+X0CWD14JnlVB9q/VuOUbX5zOnwAga1C/osCbqIA6OT4R2Rxyy9FiLwuVrpoVv YZmrxxHVLJo2q36t6CSTcA7s4M5IsulLCeRMPGzW14/L7LiOUi8tLcPuqtIYSFUSJe3q Fm5Wyn/Ms+jirYkJc+APkQeJV+BFlWF9MnILqz/jlhUMh0atumBpzTr/wPTIbofI+cjq w8Db5+Lyy0wbz5Mb32Tb4VxvQVybR0+5tI+tT1OXYZomYiFOPOTzkZux1DNzfD+eUiaG rN5MOG7jLp2Z9Gn20oeJ5EIC6L2DpiMpInLzraAa38JT3ucTG49kBbbla/jhadN6e6dT xUrg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530pfGZdaZ2IoWbIrYSQFwWRVI3xRS5ajOacfbRvTre6lUmLdyqu BtXE4oKz5GeEWLJv9FE5T/M= X-Google-Smtp-Source: ABdhPJzYq1rCgBfl2m3qpSdrj/LOZVy2TirSi3vp/imASyndsK8+/1shBdaaZ5SwuymNVTWQnqCQIA== X-Received: by 2002:aa7:9ad6:0:b029:197:f49b:5c33 with SMTP id x22-20020aa79ad60000b0290197f49b5c33mr3685016pfp.2.1606415416576; Thu, 26 Nov 2020 10:30:16 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:c113:: with SMTP id 19ls1323214pli.11.gmail; Thu, 26 Nov 2020 10:30:15 -0800 (PST) X-Received: by 2002:a17:90a:4889:: with SMTP id b9mr4904467pjh.79.1606415415820; Thu, 26 Nov 2020 10:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415415; cv=none; d=google.com; s=arc-20160816; b=JKJK65onOhpVGsr1O3AiRrgTs9sLVvS8ZF2HFsAgBI4b0UGrTqmy+djT7LjrS9VVcg xsQ6z7JEOmEecmDlJyvQ/qfxGJDyXL4VQF8uuqoDohblXn6C6V3Acix//7P2ue10tMkh l6RobwNCHgsiDwJbvPTNM3dIQ+CdlK3OyfMTX0n4IxOKev6GMjjHAO8RR1fvv6dUUeaV ygXe4unrPbuc9YA9S6Eds9gCt03huFUuPMc8HxQCm9hlhA5DpCPCfnBBojb9v27hlBJP IOVfJVkJqKZZCuVD2INoWl1RI3KJwfs9wcH7A+Lp1G6vN/zR2qpqhjyis/sJ5eQGqJQ7 KXcg== 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=zCM60qn8bOqoKIkeGM61WLPPGgFfAXgOTi4N8UHL+9s=; b=K2BEsARPoYGMJ7TxMbPlf2zKCetW1oXSpyiTq2aZcr7H40No0DT3Va/VIx8eWUuIcK MQhf6AT4qMGr8LQpnn+PqMwQaJnBkbmJ76KV7a/26DTda6tV2MWPjvHYHtME23m8kYiG q6SfvgXmh+wxH/fxoDQ17VGlX2Wx49x7Jf5f78dkCGFhDQoeLAC4dR6nrbktx7ff+/sY h58/OzrA5aIkpxploTVGEvaAHnM3vfs5rehJWQSpC7F5nRkobWjZPlueUSLK8h608NJk yB5nCB6bSVCfjAuE4li02qBpIn7HN5/E8lIgmuU4i0BPHtdDx64dV8ht1HpjRNcnbaPn 7IVA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id s12si571207pjq.3.2020.11.26.10.30.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:30:15 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: qwIPVDMxeoDjdZEyt2aeXL/ExeqK+dMXrORxI/Mdajodp2JVS66G2nwYzem4zsV6CwykV22oZZ csjhSD0hReYwBgx2Vq9R3rnR7aQIq5MHTac0SG2HD1b4b5qXkFl6LdA6SfRW4zYdis7tqVltUb A9yCV0yiE35FTPkHjp5RkVkISuFddTNUvIKUlli1SpA6/RlAO5UNINOlaU2o7MeLm3SdtnA5Bk umlV6Wiju9XAL61s3GMCc4UjDXzX4KZkkYMgKwXtb2k8TyF+Gy/ikKVw94YUPbkFEUqrxLbWU6 Qd4= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55536074" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:30:14 -0800 IronPort-SDR: x/ppN3qpSQQHSLyXMIpXKtUfeaIkhnzWY7zvXomEjKSM0BU+nlLkEm7hqzyxIv/iTcoXoXdIQx JPe1PmzgnONWz4lpcYx4a032Xads8KZRHAiiT5ufQlHoMsigpaNqub+0QkX4Wv13dqa+wLvIJU SLZBzaCC8C2JVl0L0xEhIvPE5qRb77T9k/kOaPfdUUjDxxk/ds4bPBtZWLGmAMEL8GAduOB64E SROZK1jJ/ns5PF2+iQv4Qbl/VWOuDIxXjIurTXbfGLS2ecu/KfnOxzn3JU/2nOivPhnAHRNKRd f0c= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 09/14] base-apt: Introduce BASE_REPO_FEATURES Date: Thu, 26 Nov 2020 23:59:48 +0530 Message-ID: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.141.98 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?1684448652141011656?= X-GMAIL-MSGID: =?utf-8?q?1684448652141011656?= Eventhough we are collecting the debsrcs as part of postprocess, it could not be considered a ROOTFS_FEATURE, instead a base-apt one. Introduce BASE_REPO_FEATURES, to provide user with control to enable or disable cache-deb-src. Disabled by default, since it is not required for normal offline build to work. Signed-off-by: Vijai Kumar K --- meta-isar/conf/local.conf.sample | 4 ++++ meta/classes/image.bbclass | 4 +++- meta/classes/repository.bbclass | 9 +++++---- meta/classes/rootfs.bbclass | 1 - meta/recipes-devtools/base-apt/base-apt.bb | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample index 1db6b88..3e43572 100644 --- a/meta-isar/conf/local.conf.sample +++ b/meta-isar/conf/local.conf.sample @@ -181,6 +181,10 @@ ISAR_CROSS_COMPILE ?= "0" # NOTE: this works for amd64 and arm64 targets so far #ISAR_ENABLE_COMPAT_ARCH ?= "1" +# Uncomment this to enable caching of all source packages. +# Without this feature, only sources of packages downloaded with apt:// are downloaded. +#BASE_REPO_FEATURES ?= "cache-deb-src" + # # Uncomment this to enable use of cached base repository #ISAR_USE_CACHED_BASE_REPO ?= "1" diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0cc31dd..74fc850 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -63,11 +63,13 @@ image_do_mounts() { } ROOTFSDIR = "${IMAGE_ROOTFS}" -ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status cache-deb-src" +ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" +ROOTFS_POSTPROCESS_COMMAND_prepend = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', 'cache_deb_src', '', d)} " + inherit rootfs inherit image-sdk-extension inherit image-tools-extension diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index 7b6e47b..1f475dc 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -100,9 +100,10 @@ repo_contains_package() { repo_sanity_test() { local dir="$1" local dbdir="$2" - local output="$( reprepro -s -b "${dir}" --dbdir "${dbdir}" sourcemissing )" - if [ -n "${output}" ]; then - bbwarn "One or more sources are missing in base-apt" - bbwarn "${output}" + if [ "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', 'yes', 'no', d)}" = "yes" ];then + local output="$( reprepro -s -b "${dir}" --dbdir "${dbdir}" sourcemissing )" + if [ -n "${output}" ]; then + bbfatal "One or more sources are missing in repo. ${output}" + fi fi } diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 23643ce..b589dbc 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -185,7 +185,6 @@ python do_rootfs_install() { } addtask rootfs_install before do_rootfs_postprocess after do_unpack -ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'cache-deb-src', 'cache_deb_src', '', d)}" cache_deb_src() { rootfs_install_resolvconf deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb index 8940ae8..506a28f 100644 --- a/meta/recipes-devtools/base-apt/base-apt.bb +++ b/meta/recipes-devtools/base-apt/base-apt.bb @@ -10,6 +10,7 @@ SRC_URI = "file://distributions.in" BASE_REPO_KEY ?= "" KEYFILES ?= "" +BASE_REPO_FEATURES ?= "" populate_base_apt() { find "${DEBDIR}"/"${DISTRO}" -name '*\.deb' | while read package; do From patchwork Thu Nov 26 08:29:49 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: 247 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570292oou; Thu, 26 Nov 2020 10:30:19 -0800 (PST) X-Received: by 2002:a17:90b:351:: with SMTP id fh17mr5096296pjb.214.1606415419679; Thu, 26 Nov 2020 10:30:19 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415419; cv=pass; d=google.com; s=arc-20160816; b=zkserJwu7azjIFSGZGl9fGtI/K9eD98vpuNFaG8hwBaBqohE7K9YnNPYvvzaF39jEF BFh4rfIF9OY4glAlAx/IduJH1b1GwtQhV4AnKeEPEPGri+tbu+EV+UQwlF8uHbFMeqjv 8j39571pPGy1jP3yKC0pnjytBnXOsq44xlj0PnybLK5CPBrnb1WaUi6350L318B082NM vHV4IUeEN5eVzotw4bX5AQIbVLxdHEp3PKLvxuNJ/ZxvUYL1YgZtw5+myebCiVDOEsjh Bg1HUivZjEjP1+eAa6Hnx4pEsoSNu49Ch5tSzsrC2B1jpfqrYuubwLKwQUmhzsaqJsft hxNQ== 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=CWmN8rPR9Li3omnlFdqbKxNHVTUvCyOo1s0STslhWeg=; b=vELJMC+QDZv0H7FFTrZO6t9+60FK+0TU2Q7y5Ll+sELkyd8RNi/Cfaev1qkcXlf4y2 vwFq6kQAXhJ+gekwV+2kIhV3O/oXuNXQXu753aPChQyRnrj6C3GXtXXapM1pCv9Wx2lN ZTwW5pEEFkKKN5BkBBmzhzq9yQS7kVkTqMw/KRYbcEAyalKnrjatovIqSmgig3NaELX6 HqMXg0gi6shVUFwkZAtLZYFGM1RIAx2VB+PNNwa+eeha9i2VmQQFebFCOeh0mm3Qlbnb oxjrx+d9XYVQRVjO8QY2X/S2ktC/gz2PPPMi2L3MbUGdeEVUIR57KMberrRdt4pnj1sN J9KA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=G7rwcgmp; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo7i776qkgqeu6kybtq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO7I776QKGQEU6KYBTQ@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 i11sor2746178pgs.62.2020.11.26.10.30.19 (Google Transport Security); Thu, 26 Nov 2020 10:30:19 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo7i776qkgqeu6kybtq@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=G7rwcgmp; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo7i776qkgqeu6kybtq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO7I776QKGQEU6KYBTQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415419; cv=pass; d=google.com; s=arc-20160816; b=Wshzso4SrmB0lkFwQB4Vvhk/HVqQCqpt3PO4z8jWKhAQOBKMc2aNvIzMPqTtJEpzVk QwHTCt4a5lW0fPsqLLJiQlzJSFK0A9iG81i9G8WxdOcZgGREoLDwK3ml828U4qakXhF4 v4PzZ8JpGUTBXGeZ4IqnIPDAuhChVjjfJEozBpdk4UKIp/HMwYTMiGleGbWPc+3pA/a3 NIzMmmazLttPKWdu88vy0X3m+zKkXWlHQkKLTLtnRCv6UhxL6r1kxN+X4uDmXNULEQe7 mDV0hBB9YCaD4hfBArMrWimja4f+ECcwsw6qXQ8Q0lEfxi9z22xILv7t7IWAd+W4MUAW 17mg== 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=CWmN8rPR9Li3omnlFdqbKxNHVTUvCyOo1s0STslhWeg=; b=sMSk/kQE3yE/Je7KnvWrGFcEU45sMOZulBta1bX9jph9FMoNj23zscgz2tTg5dE5nq u6q6EdjefCCli6ejjgv0Q4urgxOn8qXtg0y7K0ht3+3GiAkeaHMTs5dRuuIWdKBC1ZhN S0+Z5S30wAQ9tBjq0zAWu3piF+Yf08R9YbLo6YjHXSkoVDzHupg31ga5iWDw+hlvAFAe YCdxU7JUZjqVxBILINYdN9+ufRMGPwnYHoHdsUhdZahcLt5MGERUUdP8hzMAHGjpxFnL IfSpDe3gNLRdUGXaDQLUzLwB4hRy81JdELww2gBe+6Ag7s6KdasVQzi2WrIHILe/+/9Y B4xQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=CWmN8rPR9Li3omnlFdqbKxNHVTUvCyOo1s0STslhWeg=; b=G7rwcgmpzURQ+z6/jbYGBB2DO3zrWvNX9LUFpDKMLQGj4nvJDG//ovfqrOhDodihlh ya0woo3Ceu8sToHDgHERwfEUqnI+uYcD4f1yQq1U+Du6cfpxhU3Ycx8T77mPOgUtnxWW EU+q/KdCmSlIB78quitYu8b8KM5H/u2BWRBlqmO5iezZRf0QleK9BENc2zBjP/JD83Us kxpo0m+fB4CUUOz7je5Ci1sMPBVFbsq2rLRVSVARKdGSXNML1KpWv7HFRerdjQdbcO2N x7aB2DkgWnE3AlnxyjqziqBcuSI9G3O/oG3CyxkuQAOV1PvkwVyueSdeinrdeAp+CAjK zO2A== 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=CWmN8rPR9Li3omnlFdqbKxNHVTUvCyOo1s0STslhWeg=; b=RuwnD2RnDsHeM8zWgwbyTYnlzcrYhlqIRoXfIc6Lz+XgAK43sKseaPWug/165CTkJz 6DPXlNR+a9lrRQ1I3AjR7t5wLw0tOmapIJoZYLc49NgDvLeI/SI0WoCJzneUqecWa+80 oEF+oUiEg33bDoAZcX8XJvLpBQHSs9lZ5TsRuvcp1zoeF8O3TptJ1C6/uF8FEl0ZywVf GuUagGDimCX2E1beQQMRbFG8+Tp2O9JeW8YlfFZBfEJAndnnVH5r9L0nvcbAufoGgOpH t9o1SNdQzTRDwLdK8RehWw/eMTKyo3G5svKWGn2fqLQKE0TAYrDq/BAgOlbFVJMszA0U PkpA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532Sw+0OzG5GDAGxkhquUoF/+GKfuL3Zg5HaTvELiHL1D86hH/KX 4LL1D1T8a16xhyIA0EPnQsA= X-Google-Smtp-Source: ABdhPJzci4t13jTvBCP+WBKM69EBCvszTMFef4jBdCSXGT2A+4Apai2ivM8AieCl6743lBzuDsnSRw== X-Received: by 2002:a65:518b:: with SMTP id h11mr3545985pgq.62.1606415419278; Thu, 26 Nov 2020 10:30:19 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:c253:: with SMTP id d19ls1794511pjx.2.canary-gmail; Thu, 26 Nov 2020 10:30:18 -0800 (PST) X-Received: by 2002:a17:902:8f81:b029:d9:e545:8350 with SMTP id z1-20020a1709028f81b02900d9e5458350mr3823708plo.14.1606415418605; Thu, 26 Nov 2020 10:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415418; cv=none; d=google.com; s=arc-20160816; b=mqLI15udEf72lZC322dReBv9Yy9LIN9l9EzWctoPMwJnJE9iZ3H6YfLSdaM6rh88Ze JxYuoybr4+8O/xr3jvQy789SpFF9bQb3TH6/j+tbm8gbdnPQIq98w9k/d6S8/BBT2BxN C681RmQOXdVe/fVq2CZbbLvWmcNXOylmtzPS1gSeF2T1ResPBDZmIY4YO7+2m598QpJd trGNliUCG8YBT4WNAYkcjTDND0Dzxr4KqKlKbAKRD9PbWLDyI0KdF7zhmhiTSonUAt11 ySqkcWvOjCF4ItAfPOLn5W2EmGv4/m9FHm2YKbEvQGRBNGuHZ5wNU/xOF/dvcbSEe7RE 2rXw== 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=ygJmvu8BjMibbHoDS8dL8cyQA9VMFh6DDcUBM1cYV+8=; b=FqopbZvdGCUwtvt7nVnGfXTVQqvFgqSAQp8pbbUIokdCFZV430bqYq/Cs3VSp8POd+ PKLh8t091bGqRe1lALlVuD6VFFInqVtTdBmnvNkYRuMx7IIpqP+ALLuk/esEBXe1ZCAz c2i4+eactGERPc9eg2dnhW0RgPl/4Ks0FVEIPowxa+YDArg1FDqFa7dxqv5mBjFdkVfi 2FZWcYBeHB4zMwZRBePZdx2YDFH7dhYan7e3ymKXWUjG0qGgmUv3qIii0te/GGP9qyTp We/y07tzl+o6bPScD3O9jEsB9pYHk+Q5wHhXQve4cNiIHTc7WnXwl0axMyy/ouC5Z0lQ 4Dxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id s12si571207pjq.3.2020.11.26.10.30.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:30:18 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: HrEpmaBwXLxqhpEvk2ZMz1UXDlA40W9gLG9ExJojlnxd3+oUhNWI+mbZAE4uA5y+ieiK+8xCwQ 9Gpf5oNiRG3mflGnTZ7pl1b537hitgm8Zu5uZNhCI0nfiu9xfAIN15bAnCzLl2n4cClyFs42rD LJKOkJ6u0cjuMvyQBIoZBklQcfrLRsxuMGSBkmW/EOTAiTWe2hKSamDMaoA+5P2JBlkanhfTn/ i4q0poHc9fe9GBrFfs8sGuJK5xXbV7STnrcCQ9JjCSBloYO5ZSaUp/zb/1iIRj23VG1jUwuio8 w+M= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55536075" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:30:18 -0800 IronPort-SDR: Ec4mof4dcSN55+PKcngLcyTaCwGMaD71wi2iyzPCbpodMJk/6IBWb3rqgp3vfd0d2vFaNDdPFn KLlF2wbnvzxRm9u91CWIDuYwen6t7V5lw90mI3howB0Qm0JCyaPjiqTLoq/arSH7kXX6TVSJFV /bB2KED86dImaH40bJAxnbMbJNqhPirtmqwVLp+x2sHZaZsmV7SAmSUsOREDWID4adq27KE8nb 1a0P+32NBp/sLDgUl2hu5TGRZBrRfpnoblN524FFWyzYyeaUf70iIhWFg47LTDnEBUgzH5afNX PPY= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 10/14] repository: Fix failures due to missing section Date: Thu, 26 Nov 2020 23:59:49 +0530 Message-ID: <20201126182953.7518-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.141.98 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?1684448655337288175?= X-GMAIL-MSGID: =?utf-8?q?1684448655337288175?= reprepro's includedsc failed for certain packages like makedev while complaining about missing Section information. This information is optional according to Debian[1]. Use a dummy value to avoid such failures. [1] https://wiki.debian.org/DebianRepository/Format Signed-off-by: Vijai Kumar K --- meta/classes/repository.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/repository.bbclass b/meta/classes/repository.bbclass index 1f475dc..ac395db 100644 --- a/meta/classes/repository.bbclass +++ b/meta/classes/repository.bbclass @@ -42,7 +42,7 @@ repo_add_srcpackage() { if [ -n "${GNUPGHOME}" ]; then export GNUPGHOME="${GNUPGHOME}" fi - reprepro -b "${dir}" --dbdir "${dbdir}" -C main -P source \ + reprepro -b "${dir}" --dbdir "${dbdir}" -C main -S - -P source \ includedsc "${codename}" \ "$@" } From patchwork Thu Nov 26 08:29:50 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: 248 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570339oou; Thu, 26 Nov 2020 10:30:22 -0800 (PST) X-Received: by 2002:aa7:8c57:0:b029:197:ff4c:599c with SMTP id e23-20020aa78c570000b0290197ff4c599cmr3779839pfd.12.1606415422726; Thu, 26 Nov 2020 10:30:22 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415422; cv=pass; d=google.com; s=arc-20160816; b=KjrcO4St3nJLLl1kGS4S3K9kNDD9JFhbh13+1vIuuW/Eiaw89Pm3sfiOxXYCMRPxjE u2CRQbacqj0227IiOUeDZ2H51cr2AtdsQran+zyaN1NrqLv/ROKyERtO/vQ446BHpyD3 YQ8UichZdctMl+WQnFSNYOzGtBajtqj1+B5CbN2x0wqBwkpgsY+FwUzcvs82QoAPc9R1 3yNXPzALGQgNdQeuCnWEU0SlbBvqhIgyUZJGqHfLGWWFBApIZ6ykAYrC7P9ZiITSCSkL tajytcWQvEaAhVfgdijdMLuHtIjpmuwStyeXiyK5X6k0BcJBdMtOyOZt6xwcPDstnlNk eqQQ== 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=BlcFRTBnidIiVPjorJ6iEIgu4FCOxB6eEj6S80kzHyY=; b=xqC7NBmZ/zP6u+TWVdX0RiXmJfB4viaWWjuHk7XiCq69zoAnXRVs5SqU5erujBge4H 68sxh1Ed9xa1XFLYwBExr/yCiqseSz3FSff7z+XHs8e++PVZQurvzjSyzCaxYO1x5adx qohoQAUWxVlBKRezKlnCsZjDw2T9BPeM4eaMCBQLWhKvTg3a4969/KsgKPQQOOZ0YKaC jz6zGhegGKIukP1484SQoyIXK6Udye8WdAmAiURy2hX3JlK3mxUHbBUYm5nXeGYA4Hq7 SKPZBtdrf5cRmP0F5Ilyc0I+p6JPLU340EAB8BpdehdFeRb2ULPTQz1dvuW9coWIl6u7 RxTA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=N37swu5J; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpxi776qkgqeklyeziy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBPXI776QKGQEKLYEZIY@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 j188sor2832036pfd.47.2020.11.26.10.30.22 (Google Transport Security); Thu, 26 Nov 2020 10:30:22 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpxi776qkgqeklyeziy@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=N37swu5J; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpxi776qkgqeklyeziy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBPXI776QKGQEKLYEZIY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415422; cv=pass; d=google.com; s=arc-20160816; b=uweRwvXiKVtalK5ZQHuN5/yMNMqh4W2QN7uebi4BlYr7v2BsHaa5BuZhrHvSpOkrkR iDeLuk2mS0flJRFT9pm0QH77wyYyTbbZ6lZHUCv3/FH3pS8jqB4zOaGO9v7DzvB8/yQ/ G3WBg3ol62/Jo1teSUpVdJ/Oz8WuJfhISqxj1MXwCNTz1Bz2QnZe3sqXVm1ys41t2zzN 72xBMUqt0qi4o1DTmrRGFOxV9eyjOekQ3H3aGnPDo+hRspQj+NK3KqwERjOztzE/8N6y tIZsTNVT+grObEs9MF6QIgT62Ar070kAavz+anEY1gjXXPiPiYAiha+DzvVTIGayCo7N R2Jw== 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=BlcFRTBnidIiVPjorJ6iEIgu4FCOxB6eEj6S80kzHyY=; b=Tyus27Dfn07YTsST8m0rRwZuaFRFKvpKMmZjVdfECNZE1ShxexlBa8/AHfIhLpeWyn NAa4P0vBg6TxLAW0+JR5AwjJEjXbVh9RCAQg6PHZxTxOVooDtqTFxUU7EtPGvFpUQWC3 iPoqvrxsCQx+5avM5j26Uvbb1FO1mygmiWciPgwDW1QB9rTAsMdiulpt5wmmZZymUWth vEsj6j17JJcpgO8TLkTqryBVPY3Oiv7BcoMEsW6ReK7cNR3kOJUupaqaQub66srGBXcG REcyGl59blfIXVNeDcvDnEkKI6bzIIKqyqiI+SwVzAQxWa73EtQnPmkmJ06G0yguPnvu Wc6A== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=BlcFRTBnidIiVPjorJ6iEIgu4FCOxB6eEj6S80kzHyY=; b=N37swu5JI4e5dhzLAdSnD17yA0whTGBucnkI5n9VhNOGkfY9aLmk5zcaoPD6RA9MJ/ yMYbtE8FcMibfsjF8onspR+1RFb80e85egEvt7egZwfp/UOCYqdfmuRR5WyhM2wub77V 9Q6qgM3nzXFIwEZvLHIG4UC6T8q7YR0D1U6kU0FRhSYM6yLNAg+qF7/PBrxroFKbVuek kVOhjm7bYR3ASgq8JgLBFhcZgHaVrHqAnq4OgWKXEkNYwCVY9s6tztdlSFPK7FaHdBBX VbK6DEw34xkK3gQR1NZkANlwJxuKERXV7EuPdLeaFMVYlg5GMMlWYEwz5FRI+Wobzxu6 kzow== 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=BlcFRTBnidIiVPjorJ6iEIgu4FCOxB6eEj6S80kzHyY=; b=q9nt+ggceMchh7QIe2EYbskSVQ9dcFtz82AEBshQgC0hWp/3Mkq/Wr27TjN/3fGPHd NG3Gdd8xDeJTQ0oDlJX61EGY2R6TwWLm+ktR5tBDy9D8o4QcQ4z3xhExuFzL+IfVsSeU 5GLc437sfihSdB4oOg28bT6qTq9QRHG/I/mM/HvL+64HnXaM1peQ8tVx/WLcbgeuQscK BP0ISD79PHqSlM1phifiS1sW62TSvEDNovN71fv6rcbApEKhg8NJDJxKEYHVLrJU5JCG ODgjUdRkPd+By4pR+2c8DfECAQchNW2UZZMdoyutZ+dYLCrv31S9QVXbnmAfHBl+nz4o MAIA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533YQe6isrsH6hwie2Y6XAw3GgXZKdtiAPL16Knq4WfTWVmQ1jrN pxq2J1+fdQV8EXA+wpjMWmA= X-Google-Smtp-Source: ABdhPJwmfz1OQW1dBGUiKsY+MUj7g5mgf/4zOw+3sXD6Q4jdiuVG6IP5X0WaSWbxfwm3lXhEPtQHYw== X-Received: by 2002:aa7:860c:0:b029:198:319:4bca with SMTP id p12-20020aa7860c0000b029019803194bcamr3850603pfn.42.1606415422371; Thu, 26 Nov 2020 10:30:22 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:34b:: with SMTP id fh11ls1797802pjb.1.gmail; Thu, 26 Nov 2020 10:30:21 -0800 (PST) X-Received: by 2002:a17:902:a404:b029:d6:ebe0:6e57 with SMTP id p4-20020a170902a404b02900d6ebe06e57mr3749153plq.12.1606415421745; Thu, 26 Nov 2020 10:30:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415421; cv=none; d=google.com; s=arc-20160816; b=ZY9i3WtcLqWFJT/ygU13v18mT0dcTlFrwrty1aIuBiXbAJmOzPVE0cLtFv6H9JCilU NsSVt5PAzy6cb6nHzfBkSAVzaCsRxwmpe9KpbeB1JhMM5xiPVu1EkWGbblP9gL/LzFH5 LI5zcBo+EpiS55bMMhivsIKovbmX6ChZnGTCpPvUs1HSUk/PoWnEAREpev99H0YG3GNo vs3R6wG7rVJKr1pPruaXJr+yrjd1J1n+hnP4Nf6L82kSvnGBwfOVLfIy9LMKHNQVmYpg VTO+ONBRK3QrmRh13PFnEiSCc0pR0FC5yvHOuw4fr8xpWM5Jpks7WagXYKCBG+jL1QB4 ovRQ== 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=B18eU7q3bL62KKbWtFVdU7lPKuGVuvwwqid7kizbsm4=; b=Lz4FlN5oogHRipQNqJE0XKYCPRdQWbXzYP6ZhNeIa3n82n9t9ISFhh0pGBT+iyY/3R p709qOatC91sbwNC4wrNyvmmu9uWp02uwuAmXBR20pJznunQJ9ptcKb4uD77e23W458Y Z7YPYOlU9JsZTfg9pt79YHKFn/TP8uZnYgYtCU4ltoG0K3FVWI3yA+/N/hLqBeqgLCd+ tIRR1HcB8mVP6y2NshTOb9Gktkz/p+FPTJbA3EKgymyFwC+l2O20X3lOBwI9Vi1UrDel 2bYS0XhJHqNwz5E3znbSIhRK+77F3OmgT+LmoCxaMiX6XU9Mn5+pQzjrpZHL+WuYQyib XxUg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id s12si571207pjq.3.2020.11.26.10.30.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:30:21 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: ruOp7Z0xFpY5q36Z+lWazMSkuE1KwTp2pqfEiqm4vNibS8nYZ6yTkYPZz/Uc+C1lUnv79GzieW m1pXXD1MGQDbbSLURoy5rmKC6hxBNTISb32XmrJkMtSmVpWiXkhxCGwHFp3RGbNN8cnyi4BO+m 6uf5j0dVWVY6YuvEPanO8uKhPfbxKBdqDMNe0yC7Lf9G0vy9/6AiM1gqxKc3jWXGB9P0+GD/yK nHDRHcWNkMN+wVW03BloJZWkz09N4DDOI1OuwYZ1N2HVuiVTdoaD+VWy73sdMS+rIfTfpd9qCK WLE= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55536077" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:30:21 -0800 IronPort-SDR: LK3EwmaiZSmxbZYpspjzpV0aoh8xJcIuD9iGYl45tx/uz3lZBllCQlR0Ur3+O1y2SpKgdhfTYt C8xikuhcWLSnBwZo/75i0alIUEx6PR2syJ1FsSCITplJv2+Z27vbt+wkRxfXV82o2iY0ChI/n5 mgXNxqsHAYrbzvCzY5q6aVX4oGZH7jkqjSeQBfMQc+Dt1iMxTPiad+cL6JFt5IRUZPxvffHWMJ zBapDDE6c46XsKiqvu8kgNBzkiz82oG7Yi9MszkbTocSDuZEQlrlODqPTjAyVKHLgvNognwQAc r1Y= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 11/14] scripts/ci_build.sh: Enable deb-src caching Date: Thu, 26 Nov 2020 23:59:50 +0530 Message-ID: <20201126182953.7518-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.141.98 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?1684448658086324639?= X-GMAIL-MSGID: =?utf-8?q?1684448658086324639?= Enable debsrc caching for CI builds. Signed-off-by: Vijai Kumar K --- scripts/ci_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index 0053809..f4c33a3 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -185,6 +185,7 @@ if [ -n "$REPRO_BUILD" ]; then sed -i -e 's/^BB_NO_NETWORK/#BB_NO_NETWORK/g' conf/local.conf fi +sed -i -e 's/^#BASE_REPO_FEATURES ?= "cache-deb-src"/BASE_REPO_FEATURES ?= "cache-deb-src"/g' conf/local.conf # Start cross build for the defined set of configurations sed -i -e 's/ISAR_CROSS_COMPILE ?= "0"/ISAR_CROSS_COMPILE ?= "1"/g' conf/local.conf bitbake $BB_ARGS $CROSS_TARGETS_SET From patchwork Thu Nov 26 08:29:51 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: 249 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570370oou; Thu, 26 Nov 2020 10:30:25 -0800 (PST) X-Received: by 2002:a17:902:9891:b029:d8:fdf6:7c04 with SMTP id s17-20020a1709029891b02900d8fdf67c04mr3684782plp.54.1606415425446; Thu, 26 Nov 2020 10:30:25 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415425; cv=pass; d=google.com; s=arc-20160816; b=Nyy2/XQzMdXKJtlb1iKtk1KoBNlpEp/TmfbEVOygiRvCvA00/fZMK98KnHvTVADJ2R 7s/DcNrF8Q5CaHDY8rtFhhapVGhrpJPG0dI5tsUHjDbBOV6XPQ4ooFa5QoQo6oUXMS+t QK6EvIszpcv2HfhrSZZjDEAjkNb5E0H2KXwO3m1VfLDFsSyGS2jJ7neeh3feiH6a0Nnc VnXS/tpxfy1FjldD+hijfEW/J9H7ImmtfslTkAX21IJa22D0gNYf7QtTXgtXz92qBWoe y+tx1lc2fX10nFCanctwv44XZnoDRShDUfU0rqho4HAVdN5gvSic9Qwi+Bb8w3iGSq0q nYXw== 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=QAIMLEF0wiqz5yNNY69+eYtXIbSVDZjuv4wqfJOuO0A=; b=x0cEhk3NlI9N+Q4lx3/cZ64/fTbpF+Ta07P0kKuRycU9zWwiXm4BKh+1k2WHDyNYRT fhoPXpJOp2bQd5z/9CY/xHIyoRKDIUMNwCPLPRIWuxqUVF2ryiWsi7vtP2p/Ul0it6Ml cgCtC1NrLF+86PX0dXlHRX6a/592ov9nApFUfHKP2G91EolKaAjMDLde2t+nOdGW8Z3N 2AHuVUBp417+cjzjurniVO861wQnlcUJM9uSQv704qCPr0ZAq3QVMwqXw62UvrAgJWBz AtqXqJLFtzGGzO3VU5Fmx+gKzOvbetyqjJh9E2TtXsei9hofwKhJC1ha18cB2fG37KbG iYCQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Sw2uV9nj; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqhi776qkgqet62r4jq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBQHI776QKGQET62R4JQ@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 y5sor3970837pji.4.2020.11.26.10.30.25 (Google Transport Security); Thu, 26 Nov 2020 10:30:25 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqhi776qkgqet62r4jq@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=Sw2uV9nj; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqhi776qkgqet62r4jq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBQHI776QKGQET62R4JQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415425; cv=pass; d=google.com; s=arc-20160816; b=BxXu7KJJkLBW3QKr2biJ2nAsiILE3ua8dG9K59Mns9dGzsNcwi3/shkPzKy1r97k2c lXy/ItEkBgpuxFrY4MZCFLv7Q+/q6HRBXLqnGqxTPVEUbx7Q/FdpeVnaoReGzbRGiRV7 QLFfY40gZqCkPistvScfuxqKpEi0F5yTxouBPihRshvdZMq9CJui+EyfyHPjd/sBqyZz 2/cLxSsiFGfodrrVttzV8J4GLtcSaEMmI2/+vpxGAbYg6jeVF/6lF3uWcnlwdXET2TWm FNiPVdSIblnnsjWmIQ6epu6NqZuRXx4evE0QJ4xx1Vkh8zjnwiXfpClkf2dhm6mLh6k0 tuIA== 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=QAIMLEF0wiqz5yNNY69+eYtXIbSVDZjuv4wqfJOuO0A=; b=ROrTE7c5Mn4nnWjEAr4gQQqROCSEQvx+qePCV8KAjUXrsvfE5o+yic3BPlpAu7gpfq Pm9yvAwHSmY9zjNvY0Zq2Rsu7u2FhsA4SIhP2L+lE/6JjW15R7u5lH3azDK+yMfQ0cfE gp2MDeA/JgyL1ArZBRaBxKUWuhsqIfbTzRoZhx3CUwcR48FSxG1rtoyzZQ8aJ5GUPrZy E9YHoYg1qQWazJ4aw9m+fw9N9eBwID5/pSuG1st6wqHkL1hS5m/ElOVJ1qcRjPZyi0KP 5ZUOFByaNVFUqqVf5y8TkqWSvcPADqkk9AosPuezXN7qqwj/m26tfwFCU5s/Wp4D4psR mJkw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=QAIMLEF0wiqz5yNNY69+eYtXIbSVDZjuv4wqfJOuO0A=; b=Sw2uV9njFcpSpDJmsQ+Xx9vjZQKH05HOEbwq8d+EnjoUeQIXgehTk4e1TTSInajgGe 8wWNYgTxAJWmXqg38RKFLlydIV6LaxH6a5htucnWb20A54VHGBg5BoLMt6aRAUIMycUy 6k/d8DXGBj5Up+tVBhJdIL1NDGKc7TyYH/rr0PK5k8uTggR/oQPJGxXsuqvWuJ8XH8FC OeE0CfqnyrKjsV8Nwe6beXA7VEvU/8sgMZ2b9omBCDAgcAu8d0s8/qFht9I2vsamhLSX eVj5t7/o1iifxxFkk+UJ1JIzK5dRWDhayKdaz9Vzi4k1xXfM1xuVWzJemdP5nvMPiQFK HUcA== 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=QAIMLEF0wiqz5yNNY69+eYtXIbSVDZjuv4wqfJOuO0A=; b=Hvagki7Njgg2DczFkcEnPavtS9Cy/NCCXYjPdELJjEfkzmJlXUthQUf+SgjE2+cJZO qwuxLWB7VfSS8KXwQfqMdKezPi3lwungWfXedHjYqsFW0IJZpHqOtlJVDPTHcyr9qG+o vP9YGhkZ2qFEOQ/VXEdhh5/jT1/wpsXICLRD63cL9F4P2KzWL3Q3QKY7GDZ1PSgRKnY/ eX3zV84tC7VjckN2s/4rVuI3mXzLCdbGTg0IV9U1oHC9J/FBLzvITDdU204Ti7/zEWXb i0Igl4pqBh9rflQ83FCMxuM9wCEdFHn8vrd3q29FNpCOSWw/iqAvjw04wBESOjdENkjU N2EQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533vkOX3SdxjfrzyAQfPlTlwlPrLYIcHcxyTlWvOYfi3pPjkA/KY YXIw0Y9GDcqbkM3SLERsAlY= X-Google-Smtp-Source: ABdhPJwEBWzFm7Y7I/B8CWQ42jy2SDe6Etykm/vai2AaFHcyavAbgGD/ZwR1/5uhO/qH+l2ZAUzuiw== X-Received: by 2002:a17:90b:1645:: with SMTP id il5mr5074171pjb.15.1606415425045; Thu, 26 Nov 2020 10:30:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:524:: with SMTP id 33ls1327582plf.6.gmail; Thu, 26 Nov 2020 10:30:24 -0800 (PST) X-Received: by 2002:a17:90b:104c:: with SMTP id gq12mr4929412pjb.167.1606415424362; Thu, 26 Nov 2020 10:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415424; cv=none; d=google.com; s=arc-20160816; b=w5rLAtefXP4ku3ZNuiNpJGvjtOL57LtleKX1nBv1SjBTDzzNe7uvDiBuUlE7bMk6Sp Yt6c+IWPlReHPYLVQ3LijUHwI/qKDG5UKdPNZJHLs4WTuu0EfcMS8GaYg4h1He70UG+q NYDoETkbX5gie9eutx7wm7S4OEzv5PiU7hM4sFo7PDsNUARWkzyeMl975CC/Yz459pM3 VwFxFO/WJoRMcrXKGA1esWaN+CLgFjAKg/DgpkILVXh1OfWEqavRb5Am4vnS/N7RDS6V sihyjZXuTM1ATowWoMmtkvhY43ep1ISjKk7TvtwUFq8sRZ+QUEi1+9f951dIwdEfL+5d k6wA== 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=bz3Ffi+QTqIAkvjPfuanrzWssstDOmJH3k0IUQraIwQ=; b=XacYQs1vPd5LZB5u+zhCkSHfjjyoLeagnWc557FKhFfraPq2dC4l8PA8C+m/4TTkOJ 9bMkzwnwD9TN6NaV4XfM2zwASArGXluXkNsUt8kmPBfQ0rO9WXnxzM8SvLfR3rXpGk/M bnJgK00RY+dmvbCIAlin8aNepi5DwIjC6w7hCxI8qmnQ619kHhWjBl/y8ZvYPtsSlrap rI514BX3AvgjS7R4JV6X7Lh9/c1RxCO3/yZ8cSLNiAbtrKBSrqJOXG+7Cswwdw12RdNt cnpfp3DaexLUoa4ut4AOCe8/6v17pxMqGJB+QH6SmmBeCONdo+S94wzSvKInXCHBDYpp Sc4A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id s12si571207pjq.3.2020.11.26.10.30.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:30:24 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: gkM9v6I/19GW0dbaB4LWEs4T6XBqqWWPCrm9wUN+Sw9Mk3S62ojFb2HZk0PbedG+pqQVizw+fD Rfkk7yuWcbD5HuWQWAJsNvJ+4xcdi4UaAtZ8o2tX/w6nZbBfiw59P/ub2s48G402nh/o6ZozBU k8hZUULW0AzcWopj7REfw03DqkkeiD1Qobe+l6wk41m6jHq9w30qAQJt4s/ApQwNJW/r1TqTyV YxmuQMuj/G2Sbqd25TlQpdj20uBFCyBH+yckfR9b8h27sFuP1bhPy/DHbq3jMkdXzSyvyc6jcB 9K8= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55536078" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:30:23 -0800 IronPort-SDR: R5W0NFf5+JNWBjsC1vLx1PH61ndf6bJIu1GmST7ABZz9GuAYG5ONLQYo7CXJ2icLQVgwd6IpXO tpZJlJTqoYubeCIj0MhkxYShfoyiExABdd2D2ZfYFsEYmYKb3zDDQ/QAfKqtweV+Cp2BTEv2Ac DT7hpeptyehTPa8feDJbkSzIPB3MT5Jym44n5D4oi+tLLJCcACIin4kr5tLTzWQBRFnTHR4kqd H2uXZsXKF8MLq8W035X/h+BbopQy3ae5Ny+bjMrTc+tpbscBlfarQdLD8UC+1zk8dF4fkuuLZi TwM= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 12/14] rootfs: Fix possible overwrite of existing resolv.conf Date: Thu, 26 Nov 2020 23:59:51 +0530 Message-ID: <20201126182953.7518-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.141.98 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?1684448661112143400?= X-GMAIL-MSGID: =?utf-8?q?1684448661112143400?= There is a possiblilty that one of the packages installed in the rootfs provides /etc/resolv.conf and we might accidentally remove it. Fix it by taking a backup of any existing resolv conf files and restoring it later. This is needed since we could not effectively move caching before rootfs_install_clean_files since we need the latest dpkg log. Signed-off-by: Vijai Kumar K --- meta/classes/rootfs.bbclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index b589dbc..99f677b 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -186,10 +186,18 @@ python do_rootfs_install() { addtask rootfs_install before do_rootfs_postprocess after do_unpack cache_deb_src() { + if [ -e "${ROOTFSDIR}"/etc/resolv.conf ]; then + sudo mv "${ROOTFSDIR}"/etc/resolv.conf "${ROOTFSDIR}"/etc/resolv.conf.isar + fi rootfs_install_resolvconf + deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} debsrc_download ${ROOTFSDIR} ${ROOTFS_DISTRO} - rootfs_install_clean_files + + sudo rm -f "${ROOTFSDIR}"/etc/resolv.conf + if [ -e "${ROOTFSDIR}"/etc/resolv.conf.isar ]; then + sudo mv "${ROOTFSDIR}"/etc/resolv.conf.isar "${ROOTFSDIR}"/etc/resolv.conf + fi } ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'clean-package-cache', 'rootfs_postprocess_clean_package_cache', '', d)}" From patchwork Thu Nov 26 08:29:52 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: 250 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570401oou; Thu, 26 Nov 2020 10:30:29 -0800 (PST) X-Received: by 2002:a62:2f43:0:b029:199:d09a:363 with SMTP id v64-20020a622f430000b0290199d09a0363mr3621804pfv.58.1606415428868; Thu, 26 Nov 2020 10:30:28 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415428; cv=pass; d=google.com; s=arc-20160816; b=T27P8ee/WD7YjXk1CT4JoYrnUsTZEepEYb0DoQKBWTFiHeLSUTd1l36QRcz6xsjMfZ NE2kkmdq8X4hQZQLK6TRhvafut0/OxSQTbKGbI7494DTNEI4WZh+XACMFk+hzkZlEadW mVNXnJMJdIvo0r0DvbGj86nhRerERArjCmJOirOx8jWy/c0SAmNeQ0nb6Q4Y90fIWE0e /4Ekn7gAJ/cKbH8YRqvrX7G5YjNn7GGLc3YA3TdthI7Ty2w0RKFHBk6/oZhhjXa8HqIE atvQIm6uRDsCjg15jHXWYj/3XQ1U05cBx1PsiiYMyt3zK37V7veECB6k8GoBYTzQGzyy efcA== 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=agA5ErInXGontkA3I8DGf+eiYP2x+J3ynBNZ5TR2Jts=; b=MtGPC3HeUmlmhV6dQGVea5YseLqME1HkgmPM6u9CvJvEyBXqXpP4nt54GuGcKsWm+X DtBoVCp92dcaG6CLpWyHq8ff8taZ7Vpsjg4kAPSWIyREt6IfUKmB1dDbxv6wxGv3t/T0 0f0FOQC25S5GBYNSttY9+7G41hD16KVsSjwk1zA/wVcALuPaN/crbZ1DSaXm9tDEPJ5a ycCV4OU1jGqG2U0JZePKW0Qy9ATA48sfFYxpmqIDfsaSeqh9EXAO/TYSdxsvS9U6nuo5 vtgv74HJPSmoRlcTnxrSHupxXCy42OhYuLdeVobsleaKOUrSHU0OLKInaS5/ODT6sUoV 62rQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=s9usH83T; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrhi776qkgqexb7iyvy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBRHI776QKGQEXB7IYVY@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 n10sor3980007pjt.33.2020.11.26.10.30.28 (Google Transport Security); Thu, 26 Nov 2020 10:30:28 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrhi776qkgqexb7iyvy@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=s9usH83T; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrhi776qkgqexb7iyvy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBRHI776QKGQEXB7IYVY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415428; cv=pass; d=google.com; s=arc-20160816; b=K0exCGLPHzWRrO4OBK1Co8F4m/46X7pglE4LPaS4+MEAt/wIfQKj4mpfc4zpinlyiJ Lp6W+wpbUjsdqlRY3bJl/RI5a7ugs3e5mEmVySPLcqkCEl5sLdpJDBZNNbyTKynT44Hy CODdhee950w7owcrB6dyDqQ5QpROt2iSFH6kzDDq5gcMLf7dpzIx1XLcDf0WQlmWkQcO x9d50BPTCconsTA0NXRU7EgelICa03hMcx84WRJWlQ29bM6S06jMWDb4D2YMyreDdZvl Yj/uVVbjcJp2mr5z7FatYtfpO9lkUDus7WMcuXC7HWg+wW+S9Omv6KrtE3bMYDo8kORa W/9A== 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=agA5ErInXGontkA3I8DGf+eiYP2x+J3ynBNZ5TR2Jts=; b=I527zN1n8mvH/yG//ASplXpS2GmlMShgDV2ITkX/CxrfWRx62IgQTYPy49yugeqw8p ru5loyHC4uuAM54V7TqqXZBJNnN56LOEEbDtF6LfmO9m9BToNRce/KN54/MYu5NGUScd GFKK0lsSATIvNWiPTiQEdglmFRobevRgo2pjnNo/FHiXCldar0GuD9LAjWvYYu/lPtv8 Qn9Su9tqnNlLx0jeZsYcuWTwZKs2zP8EenbYZjO5j7jTajGfZ6D7+7FKzkgeA5cGtvFb e3pD18x+1mktSVjIyiML/GvvyLgntY2uFtRHAF9Ew9vc+7LOeaR/zw/LNiKGN9fkGNeT UmyA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=agA5ErInXGontkA3I8DGf+eiYP2x+J3ynBNZ5TR2Jts=; b=s9usH83T1VQWArtqPz7YS603CEp5WOBIOGcx0YCS7v8xGn6JF6+9lR/Sk2yGDSUq6G T9bP8WKl1qG5a2kFaBYP9VroXXytteoOpHnnNVuPaBUnOOwOUpKuJfGxhDmmdugQ7Zva 6+Nay/PDmA0Kma/1qdUU5Witr8sHTeggXd41mnugjFXehSCYxV7x4PyQQjpNKyFRjmdg Xm5qqP+iS8d/HCjSI5fyf6jSGQplVXShwk5puxdpezlffKFzjjxlNWb/hJJfjp/QG877 1/JQvhIqgQonrnsWNJYGlgoQsmyqxoppGLQJfgXZqsaHADNRg5b6N1t/EZbcfdu2SsHQ AW5A== 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=agA5ErInXGontkA3I8DGf+eiYP2x+J3ynBNZ5TR2Jts=; b=iNcCNBq4oI70udVKQc2Jfmn0p2GKwHaGDIxCdTOeLAcpGk3x5ncqatH0y/4WnePBwh 5y9U4axJ7pvq9acXFwDROBfcFQEl6EfFbups8FfZTTitwkk0rf7YXbSVh7E/z1kuvqr/ WGahr0muDGpC1PWA97vGmgctX9EGETqMQvCDyxZljHCdYdXtADll1+TsFEmjpl2b5UPA WnOJb66u2deWgOFggzKkk9axfr6EBvvwqnpzASNNvorPPfu6sEq5nxYeBi3QrPKcaTQr tamVgNenqCoC+xejx6kIzQeYqmNHiCv4kCp8Q/rNCCnnrXzUQ8E9HgnfQTmwzg52WPjp t4hA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530uhdEtevuPFk7rQ+Hcn+ykmpnJmpC89OipXkvdZSP52jBTSJW/ R/Kt/MW3JpxPDps4b/tpjAs= X-Google-Smtp-Source: ABdhPJyrAIcXeOSiTbzs5PztS+wqFDyphS+Z/PCqVaHjoZBvN2jaXC068UaaiMho7qMC1TVxJz26yQ== X-Received: by 2002:a17:90a:640f:: with SMTP id g15mr3149955pjj.86.1606415428463; Thu, 26 Nov 2020 10:30:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:524:: with SMTP id 33ls1327647plf.6.gmail; Thu, 26 Nov 2020 10:30:27 -0800 (PST) X-Received: by 2002:a17:902:c154:b029:d6:efa5:4ce7 with SMTP id 20-20020a170902c154b02900d6efa54ce7mr3625503plj.73.1606415427871; Thu, 26 Nov 2020 10:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415427; cv=none; d=google.com; s=arc-20160816; b=iboAoKzhH9uQ6+NN4RBXXSY7fixRHm4IWVrJiPSLw7V+0hh8D1DefNgy2LSTsFYtx7 pCP50PObuBZhj+QP75tyNgx9NfwDf0OxRvJIgtXlVRyfwJy25lIQxQtFi2+SFLCol0cA vSBnpO/TNAnrbgmb1LcTGisK5h66h03Nh2WF5c5kXAKKZOEOF6yN/ZFGe083s56ffzsD pXkhcqs36LSRF3dhrWmUEjksbLYWRcX0VqdxWLR4j15mHufiapiwQV3jAiOBQorbW2pn 03krp0tqhEDVrtvP06xguv2Y6n9GBqumUldwJCWv+y1EQtzKpmcJt3ELU4dcQw4OgXBW FJFQ== 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=yB2h2o9k8irIfE9TD4E/7tvw8sBDNdVY2hHVrD34SJw=; b=bmkKlO5INLAevoURFSy6iK2CKFMmrrBuwYpPobwVxnhE26a4Nd+I6zeV12KSvhc9e3 FgKwy96m4TqvsciSQwpA5KK3WKZ0AnXQnZSqmDh2cXof8LgYKD3nKb1V2g30T9foalgN tfMUXqmBIfzrB6hgVXMfsOp6oD1qSJicesplq6JHgvq/nvpRi7xZ4wrL5dlflYbVnUyR 2xfZUPj4OpCP8CJ+QfrLJ+PYfwTBDa5D9AxqKsDiOwUI2BzV+pYTKadWYcDEkShQgIzp +FOyvdhY5f7tkE1pP1YemJPiAml8qq+ud7icYh7gr1u5KGxZs7PONtjwFClY1ZngslZ9 PvLg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id s12si571207pjq.3.2020.11.26.10.30.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:30:27 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: MHSbEsEwrsgG7Y/HnYJFNqrJyPjkzo59xPO8Yt21sRVKz63U7+yx9yXcBqcXsp0R+iSry22Dnd edwi224QNwR/k/YnZOjw76j1UmX2Aws+LpU2I9Mu/hUgvB6EmGv1sLHEKU7XAtEjuxKArWuBOt PmFPm8OlFvNBR7lepHS+nBNcEF1pQrVTn0nFGTESjmSH3+CcQ/ojY1W8XDBQtvLDblPmvSisYq wC/YcyL6IH1FSqi6kKEgnlA7FYtKDb1nJvCl7jYtYo41T29ewZSDF3vq3SWf8eKkrzCkedtFYT s3s= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55536082" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:30:27 -0800 IronPort-SDR: ReQQsoWb3vHCWS7uMYUzcRUraO+emlRzcFt0mRYFKUP4pcIAWCiWBCilmddKSKkAj6Cy15jD1s zoPYWMyIK9OdRkGRy3KskMENQOSSGhMeroRn727O3TKCpNoiUGazvBSuGCxjxAq6s3080Zlb3x OJUbZ4HRaIdZnA5TGrTW6dgTp3tfLJFsyRKB5/COWmo7Oqu+xYba/+LCljRARwPDCMA0rk98jj dElVt+vJ4XENVnvb6RCkRnN6oI3KVdhnnT+lkAHLM6VApQge7WV3OFJG3mGxmp5uFTiO9E6nzD 9VU= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 13/14] rootfs: Handle failures when postprocess is rerun Date: Thu, 26 Nov 2020 23:59:52 +0530 Message-ID: <20201126182953.7518-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-9-Vijaikumar_Kanagarajan@mentor.com> <20201126182953.7518-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.141.98 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?1684448664995961390?= X-GMAIL-MSGID: =?utf-8?q?1684448664995961390?= The apt state information in var/lib/apt/lists is cleared as part of postprocessing. This makes apt-get calls in cache_deb_src fail when rerunning the postprocess task. Since we cannot run apt-get update again to refresh the state information, copy the apt state information from the initial bootstrapped image. Signed-off-by: Vijai Kumar K --- meta/classes/rootfs.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 99f677b..efed0f6 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -190,6 +190,10 @@ cache_deb_src() { sudo mv "${ROOTFSDIR}"/etc/resolv.conf "${ROOTFSDIR}"/etc/resolv.conf.isar fi rootfs_install_resolvconf + # Note: ISAR updates the apt state information(apt-get update) only once during bootstrap and + # relies on that through out the build. Copy that state information instead of apt-get update + # which generates a new state from upstream. + sudo cp -Trpn "${BOOTSTRAP_SRC}/var/lib/apt/lists/" "${ROOTFSDIR}/var/lib/apt/lists/" deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} debsrc_download ${ROOTFSDIR} ${ROOTFS_DISTRO} From patchwork Thu Nov 26 08:30:54 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: 251 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1570975oou; Thu, 26 Nov 2020 10:31:17 -0800 (PST) X-Received: by 2002:a62:5b05:0:b029:197:fafb:50f3 with SMTP id p5-20020a625b050000b0290197fafb50f3mr3672756pfb.76.1606415477821; Thu, 26 Nov 2020 10:31:17 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415477; cv=pass; d=google.com; s=arc-20160816; b=zLI910WnhZGK/Z9WwXt8mybYr2KYnDeuhZ9dUjld/DReICWfnGwCEbJwGnOvAicxZA 0aTf/kXIoX4mNO18GxKcwA7UGicgIsqtekjQdTxalGSCj8tRQljysEJ4Ka+wcfgv/DRp X0nrKQ8rCQgu7mQRk+KvP1QQou2aI6ymAGWxr8tykLviBVfr9BtIbiP0VEPfT/ngmu5E v/QrsP7tdl6yXZrUABi6b4GJ4rhgT6BfSf8/7lT41wSnbmAdGnUewXgltBKeUciXvi88 PsXjUKwz1zXJ14fG9L38hQQxsrzrGBSBv7dVa2OF4QIbx4rldopIlOdiVMdf/2hUgYgh BdBA== 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=bJcGJm3CsOWBRAbYOZyblUgYtkL4MIHM1UoGbM2hjqk=; b=uCquvBlXhLz7qKKgpKhBFqD3Q/MZr9aJwsqOyanYwoQUFvzM21N70u9qIAnGxbuH4G QOC4wB5ye/g8hmnDPtnfNOvZdj8XJ5suXj74tk7phSEdu2hzbIaDKWOnaroOYWU7pFTC pDh+369QjM7BRVJXYbqLsCX3Q7HD9+GYeoB+Bn3iO5U5ImwjVuwkQjcfyLWhwrmgbIjy FDZfWTLrcLMgTh2y9+pKeBMor1BjHNoHIhIN1b3XHxOZN9mdgKIZ642j8hHpZUSH0RLB B3PexPZ8eGG8WiVTC5EBvXiGIiysbIFnycOGjmnb+t0Pyr3xUXOeNIM+ttQydnSylx4R fYHA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="Ey9VYfV/"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5pi776qkgqe5eycuna@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5PI776QKGQE5EYCUNA@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 i33sor2035157pgb.19.2020.11.26.10.31.17 (Google Transport Security); Thu, 26 Nov 2020 10:31:17 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5pi776qkgqe5eycuna@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="Ey9VYfV/"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5pi776qkgqe5eycuna@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5PI776QKGQE5EYCUNA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415477; cv=pass; d=google.com; s=arc-20160816; b=kVjHzXmDE37kDD9lsj5VARZP6lrmeG0PNiISb8kDDm9qeez592xGCyNJnjBYAjLiIf TKYDBiIHAqgSxe7rqyCP90LPSWJaKHJT/mNHBo4RKcwA8XdHgWgdH4A7mxRp/xynJrsO 4Ahjce6HQqcYUkW1NZQmcsfDasdeGN8rWHRgltjKprU7zHgXvSalrcI5NX+x6Y5VJz9v Qu8sIdqRXuyC+mA1mz0ocv4ruJPy7cssL5zrQ+xpyPwtUA1FMBo+t+x869P3xUDHXBqQ IzPNyiSm6kvj/t4Hl6NOSmPpRL0JYkA6mpQUzpZ2AWSdJObTsHckQdN/amtk4hv0BMMj 7i/A== 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=bJcGJm3CsOWBRAbYOZyblUgYtkL4MIHM1UoGbM2hjqk=; b=PW317V/nuM1ideSgYfIB3lz3IpuodbRG1C0RobWHkrrQt8mO67XWx/zKVXrR62iRAF cGdlBHwwUWN59+qf3Yua2SjVZqbNj3vfPwPGLqiJ1VUsn4zhMhp/CJPG/AJ6fMzzOEWu 4SU45ocXtOII3QJZjdIh8dj0beEpiiQdbiybvel7nckcht4qVhbKyvxUdAEQSc9Anf4/ CWC0piTYpxcmR2yxM966Udtj0c1/Y+mprKS2u5yLDQ6uah5LVcxqr0M91XPtGS3myxi2 q1R6T73FtF7I9pYz5T9Xt+7gNZmf86v0NFEqMhfzFq0Na1u0m0prTJoU9f4Serqwl519 tadw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 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=bJcGJm3CsOWBRAbYOZyblUgYtkL4MIHM1UoGbM2hjqk=; b=Ey9VYfV/1AgeLcHURfrq6WOkPnM0bJ00l6RMDJFddhuIowqdE903EvICZyDkroE3L2 p+NcHR6nCFQzE6x2CY5aP3nvVfm22whjQXwHcIHaVsw9jNY09426W9HalghU2GaKk5w+ A76QRqGkYSKhYUWx+7fQACIgBw9RUI7pVIxv7EwguZhgR/l71cMItSDDb3D6F9RHB70i GVbTbAf/hvUYOk0gUsXbJKzmeaNs8+HCVdVoBf0i9Bb4FUhXmmLttvfVxMCSDQHqJoOL mYpaSy9497WAh7AyFnoyYaD1SFVhyJ/UOP8gc0LHrktsJPpGyXH6F3bZ7J0LyDJLmvfd 5erg== 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=bJcGJm3CsOWBRAbYOZyblUgYtkL4MIHM1UoGbM2hjqk=; b=CJOhc03EBRe4vwMXiPyOBVV6Hh4KLvoVsxqmCFbZtzFkjviPYR93YPrLeVYLF7PthI ihZRtwmlg2pReMqGnZFgzipJYBXQ39TnXYkai/3ZaDo8u8V/6LrdAeALE7vFC/zyWpSj A3ZRTCLwHEV4r82BcT3/9ZR6YEJ3dz9/Cw8tKsRb8/MTJuvXO7hbEUhc8CLiNZN81T10 y+fHk0CzbQNdVpqCPSihlHHz6o8SQAKUyYYxAjMt/fa+3DPebTpB0M5l7KlBYy40cANV S6XY/0x9/pzhYktDMkOL4i6rRaeodsuOdQUUPHvB24N4xMROnmFpw5Al+e4sPV0EuZeS d5wg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533XtMWgkbACeVhCxXh9WOz/qQ6PRlKv91Cze2I+wlmsWqny+Jdx NEwNctD00KF4qJnOq6BDZuo= X-Google-Smtp-Source: ABdhPJzgGUeH9bwLUZfe2x/9MzzCRKhlqQbuQRQFHp9rcFf8XdYm0rGI1GS9TT2f+QjnP07Aurjz4Q== X-Received: by 2002:a63:7f03:: with SMTP id a3mr1962012pgd.313.1606415477435; Thu, 26 Nov 2020 10:31:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a63:f601:: with SMTP id m1ls1002484pgh.4.gmail; Thu, 26 Nov 2020 10:31:16 -0800 (PST) X-Received: by 2002:aa7:9888:0:b029:18b:a9e2:dc7a with SMTP id r8-20020aa798880000b029018ba9e2dc7amr3586894pfl.67.1606415476778; Thu, 26 Nov 2020 10:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415476; cv=none; d=google.com; s=arc-20160816; b=uAShWdcJFOJYtxUuhZ6XGK27CR+tvxvMObS3RffPMp/Wv3WHZwiUcrnkEz76wuqLdC yk4YwlQTbQfzRdoXMAK1Q7QO1xnyMzJa9rwsOJrP3Ljmtr3mv6eqH89SKm5DiILenoCo fv/8cJwfAt3emCNfheEO9qTdTd8phg6uT8whz2CEvvI8pdsIXGcK/AQWzSbNsTPJX0O0 4nUSwp+WeoBzlfW/3YFBr9p9CyHTksRSE8e4AjEGex+hI4zYxkDtpbKJD+owIfmkfOKr G0wrrWbdf3XWetEgZqXU5MBAWTS+DeK408goZ4mZW+UI9nmKInE1rEOgpTKNkRynU3dW 7CBw== 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=n86CWes63CscKi28nbFasxAn1G8SdKgNCwDn56jZAJ8=; b=Y2NfecCpv500Hc511k8SIrUcW9TuXb1FYMi/m9BtVC3dfnRgVc1jDSUHk/7vsDfyOS HNzQ/ALbbxI+c+4PKQi6snNafoXWolE1N1JdWvAWCLJ+PWcxKXYvD7HWF9+XZ70j6Ic+ +IHRvHU9vlmmKD9zNfBalOPo+x3z7UhUh4MCRJgtKssj4kQIYG9DI5FM4NgvdUNJr4QH 8jpjM2b79urAd8NP/S7o5YNJ1QexGuKFNqFjPLzXugw9/zu8G3OreFoHtJWz4pQO+/zn R6PPOQvuW3y7vDHERH6mQms3IEU6dwpEz8E1LMr49Lym8GUqCPBqbSbVmJynModlU2nh pnhg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id o2si477769pjq.0.2020.11.26.10.31.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:31:16 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; IronPort-SDR: 4zWRAI0EH9DawSACPSsllKRmvsMyDXTUTdUwKykd+j9mi+scGuJi7/QpAecYNhTnht3ltpa0BO 06KL6hkmWbX9U+xL6pz5XS27kMCwhXdqhl0LRwj4NPOU1zsulls/WxhHDrbJrKg6PFiEomW3j3 v5mIo+9+54SyNDbWvxWBmGaDCknpp3JqXuKk92sZGO2Lwq7LO6a0gUOZnyZoi7lwuVNZJSk11U a4PArjzWavU4L1raEfARMMI17LmdAETOICnA+kE9DP6r5JK5pm3hPgP/5VhmJLRHo1RctfY3Js DPM= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="57815823" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:31:16 -0800 IronPort-SDR: kHpAMUSlLrt+Z6Zmz2DR9vCpiVz751VbfFIpXR64xNo011FVrtqFJaDnNzJ7O7wuqbH8by5k4x Y65Zq9Dp1EFhyVvM1Aak1pGdVyZZqestrl4cbjt1i3yscmoIb2DkfgollSX/10vIk8T6r9K62o rymag7QfPktbrXGH5VmR/l9pr+QpL12iBrrldYH0VxBmqyjnpRi7yBcq/FtOgobCkrmhJZnbNF +HcwaQ4hqzhS4iyYZwHKsSb7GqhS4dJefCM9XwVDWfh67uzBQE+th01kC+RTt3PhYmjmLEhPqO v9o= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 14/14] doc/user_manual.md: Document details about deb-src caching Date: Fri, 27 Nov 2020 00:00:54 +0530 Message-ID: <20201126183054.7593-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182953.7518-5-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182953.7518-5-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) 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.129.153 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?1684448716210591468?= X-GMAIL-MSGID: =?utf-8?q?1684448716210591468?= Add details about deb-src caching. Signed-off-by: Vijai Kumar K --- doc/user_manual.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/user_manual.md b/doc/user_manual.md index dd6fc34..a4f3d1d 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -919,3 +919,33 @@ And build the corresponding image target: ``` bitbake mc:qemuarm64-buster:isar-image-base ``` +## Cache all upstream Debian source packages in local apt + +### Motivation + +OSS license compliance: Some licenses require to provide the corresponding sources code, +other require copyright attributions that may be best provided via the source code. In +addition, you may want to archive the code locally in order to ensure reproducibility (and +modifiability) in the future. + +Currently the local-apt generated has only Debian binary packages. Extend the local-apt +to have Debian source packages as well. + +### Solution + + - Trigger download of Debian source packages as part of rootfs postprocess. + +With the current base-apt implementation, we already cache all the binary packages that +we download and install onto the target rootfs and buildchroot. This is then used to +generate a local-apt for offline build. + +Use rootfs postprocessing to parse through the the list of deb files in ${DEBDIR} and +download the corresponding Debian source file using "apt-get source" command. +This caches the sources of all the Debian packages that are downloaded and installed onto +the target rootfs and buildchroots. + +By default, the Debian source caching is not enabled. +To enable it, add the below line to your local.conf file. +``` +BASE_REPO_FEATURES = "cache-deb-src" +```