From patchwork Thu Nov 26 01:18:59 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: 224 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229250oou; Thu, 26 Nov 2020 03:19:51 -0800 (PST) X-Received: by 2002:a50:d90c:: with SMTP id t12mr1965314edj.165.1606389591752; Thu, 26 Nov 2020 03:19:51 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389591; cv=pass; d=google.com; s=arc-20160816; b=nIr8aGFuWSWVMo1rGRF1kf5Vv4pxevT0MBFOvze92R89Kq+criFMfnwZ6OIEEGt64d czrrzJQ11aAHGHB9aO9HHpZPLwMRHzfiZMzHtW7YPIc9CzdHBrwvhNYBccrEKJSdAxmG 4PyQKV2r3g3xTR28CrZYAzvTFXOhYLmwutC21LY2IvmTgLnI2kDAQM3K1djpvQjPad2y Ahr+GNY+O43oh1hKG+I0nPxupzgIz3N5vvdhSKTC8VRn9IKkRsGJsqc13Atqzedz0ISt I26GpU57eUx+btyX7OoN3rT/WlY+R7de15Rd5GGhBd7K/GlfM1qGsGOCaMxa6IrTW26s dW8w== 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=A6ZLL4U0aMHVNwzHXcwfPMAVoqSzoyN0THSlj6yKJAg=; b=ZDSoQLUeZGjre4Zo5nvWLoihpTuw/Gc5bNf7V6sRnlQRXZwTWs8Ird09+HOVH4A+HE IQU+UBN5uKAiZUaOVu1gZBzGGb5IO4W4ZHBkr2VfdjH8A/eH9vswilfv9c3VF/vJY9cV czKyzJINb7S6Ox2vy47PNhbikDZ1t7+zip2WY8f3ElNORhl6X5dqk+QKoYM2kcrpmbB3 UnM9OBRwGIST7LU6JyaTcUabI/YdpuMJTEorS+h9XQHrlAkoAXL6HPdKsqV3w+KlkWSh KZfr33XTuVEYh5tgYC6qL6YUBnZBfi9w5D6zxUXsPi2MtNPjnz1xWH9biqVkCsTttdOk bo8g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=cTEdV5xa; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbv46736qkgqeo4qh5eq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBV46736QKGQEO4QH5EQ@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 d21sor3203392eje.9.2020.11.26.03.19.51 (Google Transport Security); Thu, 26 Nov 2020 03:19:51 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbv46736qkgqeo4qh5eq@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=cTEdV5xa; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbv46736qkgqeo4qh5eq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBV46736QKGQEO4QH5EQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389591; cv=pass; d=google.com; s=arc-20160816; b=NHtejIuZQvHFWkvMk5+MQY5tdzsCLfnS76HHMplaXuncG4/dOjVt7wWhKrT0G68Wyn LSTWd7TrTkKEDx4PyhV1wfiauZ0x6t2EVVXnY7f2F5jE120kEUeHBaTVgDzWTT5/eEIu NcS3jEv+BmZIKPF2U3MoC3zTXf7sNLxtRiYLyLobbqymKLA0CGOFB2x8QY3YILxkgFc8 Yu8Bgoppx8qEPbWYNqJ3IadKOD1f1gM8lGcpb2TBoETAEwyFDjmVqKnsbuykb3rQcpEB HC6KCGcbXtsPpvUW1XtKwHMfHAbrWRLFUAqsTc5sxVABzszlEleIQXc0HpioPIoNMH4l etGA== 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=A6ZLL4U0aMHVNwzHXcwfPMAVoqSzoyN0THSlj6yKJAg=; b=xH3WyyGOvnuNrsCH1j0MVinYHagAazSa4NBTmM4/wcyRvVDBl8pPUXXV5tLxDW0Me9 aC1uZLnahADy7Dua26yIzHNwPPk7YhlfZVZcZnMRk/iiHi4nGERbb+OZqibFaFJzCiQK 4C49fihSo90kXymhKNgrlbsK0LV9eXqPjlripA4xYQA/efsdqM2GcJy27udz+cAMlH+b HEwthnJOYwsmnDUYKmmWP0zmiXzaE13f/EaK3dTr0Sx92oHBh/4FX/zX0oXeu99tk64L N40w147SupVwDI5XokJE0TgH8rTuc4fRebDLF2Rva/KBKG4H2j/l0WJfW4wKRFxVnvpr ZypQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=A6ZLL4U0aMHVNwzHXcwfPMAVoqSzoyN0THSlj6yKJAg=; b=cTEdV5xa1mQanOc6kCAofSU9ZEj+PP94I5Qk9do15QyphCd+odwoKP0iMy68r/UYHo S7YIdaJXL0rYR86/fW89bOahQeGODan8g0SGuLDz7CNgrEiDnUmVOFZrIF6knm3Q9c60 PqKhBOSwoGx8QlIYYLD/uBI+OFD2Ef+ZUmSzjhx/t7oJihBXnuUJoosEnOXMWhWR5nra GtM51T6WRFaw2MQnWACVJiy1pF2fGNRyzKU4e/qLV/GVpyTiUIEmlGAM3ZTWo8rCkTIp yEZ+bJp2z9XJD5s+Rl6pt/v8BCeySAxEmwkA/s96a4/4cOWnwHIEqLcSKhFLg6hsa565 sHkg== 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=A6ZLL4U0aMHVNwzHXcwfPMAVoqSzoyN0THSlj6yKJAg=; b=KxP/Fd2+7lXIlLn5sh+mJuzeVTwypmX1nb6n0bMeJNIzIJJc4LHxDbK2CUYc08surU pakF9yezHPl+NcRExjl4wDXeioBaY+PCLnqbsdx/a5Bk4uAC5ManwBG9wap+f/kjkIgW otZdJ1QsRhp6DiNpsKSAnhJn/iTvZy20dTnMwOixTuz2FCSf125G8C8Q7mTK32LLfOfL A2TLFRRMf4eTMm26F8XW+7vHt5cGEnC5Mztu1oI297w518mlRGscpYQpjPg229qiwxR3 VoMyAOy3qnxxguyVGWP8UTL6nxKCkXzt7z/w8I/etzqIwlzPSrRtQkv4NG6DZE4au48i Emcw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533YuakVPfSd6EaNYvxLdK7dZs+FVQAnQxcyOSvBu/dYICiyYvrM 3b9evct9O9II5A4GJbe8rGs= X-Google-Smtp-Source: ABdhPJxfyEvQHDoT8tAPe8XlDRCu2VKDzR/gouzXUlDPb3kc3xGVG1Qm/DclxtPOQlQ/3NrxH/h/sw== X-Received: by 2002:a17:906:8c6:: with SMTP id o6mr2115162eje.230.1606389591487; Thu, 26 Nov 2020 03:19:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d151:: with SMTP id r17ls1870382edo.1.gmail; Thu, 26 Nov 2020 03:19:50 -0800 (PST) X-Received: by 2002:a05:6402:1389:: with SMTP id b9mr2068360edv.178.1606389590710; Thu, 26 Nov 2020 03:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389590; cv=none; d=google.com; s=arc-20160816; b=XMwimPBzTRHQUme8OXae/YteHvXRXDXVmbVcYv/G4qOEfU3MYl7z2pQjLjMm9U/CdP HLem/PWRS3b5qR8yvC/UIpP5GAypGuyE+772DQoSUaRTL+6VP18mRBEFQhTKt38pd5M/ GpBCCQn+JdsAT8AYrdf0v/rufWC9o8MIRY/a1BWmjYYTrZAn0WlpVxxxn+VycgYdjMy2 piYbUBxjiXPVjp/X/XVJQR6/1T9ut9aI7jJ36xr9yZb7EhbD8rXhs7DKgU8mS6A4d8tk j1nAecMaoVfW9SlmQrNks16i9epd7oiu4wECvTQDXqIPECK2asd6/SolA3re+usSHgDS WQrg== 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=QHFCHUmPGHWW5osEMamzNyvoEWfE15MWae75uWEOCK4=; b=zvAyP7DX+fkvFGO181X/hpAMOJqH1li3eh6FU+1jsZZrKKGTwSkJBI2e3Da55mGVFO vIEtQu4dLA5nLcAlWFxbIyxJkIPXshYysOM3rh4GsmjrNtZXJe7Kj/tMpUcf6CA1PV6g fI3C6HiYfr090I6X47/IO4m+lJuopXTnVZNER67BIo53XS8LKJpH32ZX26RAm04Jyi97 rIlQ4sH2sPIPlMSRx6PGYxir9tgQ39ukEYDI3OxI1nffnm4eM1mCpbt9/79DXQEupiY7 c/ZrNej3/eUMRcuX1QVEVYJEW7yU+1HwFdK/Y5JPQBR28VC1V5itzyBbpzIJr+O/lD2m 1yoQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.19.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: T/hNxYWhk3apbPrEEb1xzqR9Rl/OzN9EkRvFNsC8uIr/7wMwrEB2bDLmchuHsNfWrU2pFlW1Mj Q4Sdr5ZZ7ukVoyh/5OyLN0M9OWvvnumalkvreOOhr/syHGdwGUsTNZNMug/SluYQ7Rxv/20ovh JihlKpgalB6aQ6ppOATsNb+7nUlIx7L0ybWCOleE/DlkMMfNhRGl19daCLTHgjGVuo/23zYPdw vWzIvwmyupiOeWAixNczm9Zw69ZADxZOMZk7kKexqzOFt3Hpbxl/fOlXK0lMKrv+Zfi73rIqCU mPI= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500399" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:19:49 -0800 IronPort-SDR: OznMM5H96U5t+yrNntm/qIidxE87UEMqh4H+PpPzWpO6g5M398aMDGLbumFD7vP9fsEbSmzCvp Z/YKwWRSL1Rbgq2KhnjvKAS+TPCbOwJmHuAvEpNsM/ZPEjRfDC8NxsHvUrIOSVPxoaV10jiaQW NR212Qc80nReLJyDO0r/Q/55OYDK0k5c4pu2JsixPBj3HVWduVTWi9Y1bfdZBaF8dIQ1ui3myj f7W3nRs3knZbB2S+RONWhaen3hNo0mY+h93MrtR9sx9Bfhd2aryjcHOi79FAh2btzPt3pKpDSW yvE= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 01/14] rootfs: Make rootfs finalize a separate task Date: Thu, 26 Nov 2020 16:48:59 +0530 Message-ID: <20201126111912.3037-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421572841773914?= X-GMAIL-MSGID: =?utf-8?q?1684421572841773914?= 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 a296cc0..2391529 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" +ROOTFS_FEATURES += "clean-package-cache generate-manifest" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" @@ -173,5 +173,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 2c5d0dc..f9c8995 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -11,7 +11,6 @@ ROOTFS_PACKAGES ?= "" # available features are: # 'clean-package-cache' - delete package cache from rootfs # 'generate-manifest' - generate a package manifest of the rootfs into ${ROOTFS_MANIFEST_DEPLOY_DIR} -# 'finalize-rootfs' - delete files needed to chroot into the rootfs ROOTFS_FEATURES ?= "" ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes" @@ -201,45 +200,6 @@ rootfs_generate_manifest () { ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest } -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 01:19:00 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: 225 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229319oou; Thu, 26 Nov 2020 03:19:55 -0800 (PST) X-Received: by 2002:a17:906:a195:: with SMTP id s21mr2238916ejy.146.1606389595495; Thu, 26 Nov 2020 03:19:55 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389595; cv=pass; d=google.com; s=arc-20160816; b=fB/FEtelsUzPe3H9XvTe20WA9ERky5wmtrRKxmdonqwrcrw+hHeohvgJtZFN71vZfW ELXr/BW+TQlcGzInRDOOVgZ0ibLsJ4WXblG/LO7kDPJY6+XdxFmEsjsCY14d4izN6ut+ 9IYmTSKitdg2D0TZ3L2BGEP0z53Sy16C2Ed3OxYd15eFTnalp3Sa6nTYGuYFEManfbpF L2UPg4i3gTeig+Fi05lA0NFcwUa/ZGqlWDKnpTrvdIPSC2GI7CfIThBpeNbS6RwCAWM4 dPgi+aaspcj5tEsyP89I9npFxjBNectTA2VAbxDsG+ltm+6sVQm72ScHJjjC0+YFgt9c bBPA== 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=+hMqPj30yQrorBDWxEfeUpuNuoU/OCAq9KKnRoAbQ38=; b=mnhX8oiu++ljQvKFvfJEcfGOpXJYnmTtAuM6kOY/zkSRHb38WS9sn3/5MR2aAxN5if ogDc7qmrIBQQ98ZAwj3HDB+exTk1UiDhWTWvfOInG0wHvnJ0oZM1cVpgTNAEhpBJShKH n387DfO2puAXb73+SQl07M5LrS/5TEpOzFkVypf8aWlh1nSbqycEjRpwARjFqKvhFTSi 6IKp0CSY8Xw+lyjV7oTsyUGjSA9Nl+wQFI3Namt+2QtKeOGCb/D7Gy88e9vINlLTtFLj LXchU66DLfc2DjE5XDwHIvSNBc+GdeT2z4iz4Tu9drXFsM1wx0YpnGkMZfhuKayIVYcv SH3w== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=dkVVn2M1; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbw46736qkgqea2sjjiy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBW46736QKGQEA2SJJIY@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 lx5sor3255549ejb.33.2020.11.26.03.19.55 (Google Transport Security); Thu, 26 Nov 2020 03:19:55 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbw46736qkgqea2sjjiy@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=dkVVn2M1; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbw46736qkgqea2sjjiy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBW46736QKGQEA2SJJIY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389595; cv=pass; d=google.com; s=arc-20160816; b=MgSghJsGLNtGh95l2XHDUsW0eag/Vb3PJwhsUx6f+XlduGy3DO6E3qGr6DfLcSavxF eE/yJUR2eI6LHFH+2BFeo/gtD9/bs3KDP10GxuJrsgnO8Kq89taRLACR6zYzh/CMVL6J DONEWMMiCNYVUlkmErVJ8T9mxx+UUPzyAAWSdLP9iygSyo0Xov7EY3O0npbRZd7rP9Cb nUNzzO9nnkJ7eM+kQ3tEVWJrZp6NMuvIC29h6BU0aj/ml0EOcxk8/6lIgcsAGucbH6to huhV40+DoC2zYjWfAwrtxc6PZTx6Es5/EOdEFrJDcyZ2UP3IfbJEG49OCdix13/YuLiq tsog== 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=+hMqPj30yQrorBDWxEfeUpuNuoU/OCAq9KKnRoAbQ38=; b=dISrsfJm9xHANf2Ksf3Zt3tbrGsVJMGr3/MiIU3l0uQ9H6iBqM3CXIfSToe02FNOdF qeVgjSqnKfQfkVglb419qGdCiFjaOWPnH7RNelhDg2sR4aR2QneVu6tckItAWZXJKcx2 Y/8Gdy+OwCWb7KW7YPhHEDfCZep3jnOhHl9Sy9ZNKI+PAV0K7LbMS69/zAs+fVm7vfuO YQk9UnKlTzeavBuloMTHxyMo9401bicE8me9C49wE+iotLNnP9kh3CaJdhx6Hb7ZBTpA q2rxbR6vZLBWpv7cym7YtWPj45n1tP3kCBaIBgLVOUwmI77cFHuP0KqE/X/24+cvPTnO PRFg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=+hMqPj30yQrorBDWxEfeUpuNuoU/OCAq9KKnRoAbQ38=; b=dkVVn2M1CcS+0EPBmEDCD7+n1bD8jPMRhflzJCPp8xtYZR+9mLhZfP8QAWSVSBj8Ct oA0nVHzG6I0tXYkISx37y2oYgEY50sZwlxH+/FPeoU+DxXVbZo9Ul3YRcplOiCQ9RIcD Akt/JgHMRUbEvMKdNMA0zONyxSHlwIr7BTXKFmcnozmTGrfeAHuqHvngVxL+qq9iWE9T hQO+gg3dIl0AT7ROqCGldAji7gaTuVAEfT4LxcCGoH/sQDr7ZuZGE/3bWu5FCGS8V3Z7 e8FHNW1XmbJBLfrHqKeKenxhc3KwUFCAYPBMCXWpyN8VYrjM3+YPqguP+BQ31Oq/O+bM NVFA== 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=+hMqPj30yQrorBDWxEfeUpuNuoU/OCAq9KKnRoAbQ38=; b=bvcHObh3ctu4TYw+5uStf9EjK7Cv3GQEejKeXB4+ghmBgo4Ay2KnAst1w69L28J3dO qdLWpZmdBtRD2Kn4AsXKNdn1ed0rQvArKYb8DZb0WLX7vkL5bFJXzYHJTzpX7l/OCRF2 FjrVljH6B9hzIaBi3Lnq6fgShDmVJmhVvj2j6u2NU0Mub9q40wDmexzNc6OCt5XUPFoP zHCqL/kZXtvLxen3z8RZ8CTgfFKN9i42/y6FRoAHNkIN8vZBYc2baB/4aPggp9uVf/Uu 4gaaDD04Yjw4B0cGdR9f1bYzh3AfM3b0h0qJwjS8dY+RSIYqyw1afULvOTeS1l7kklJV 8iYg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530bV9gAhGLLmefhQ38oFjEIQhxAsbTPP00iODKO5F+7QBQIUasP HK3uKxEhVyx3WQZEF5JBjP8= X-Google-Smtp-Source: ABdhPJxNVw6xzu3+PINjYypRlvgr5mCWa3T1nNHggGgOqUHJ7iDLf95zKCNFfXC0b1rvvE1Rw4EvVg== X-Received: by 2002:a17:906:e254:: with SMTP id gq20mr2156867ejb.520.1606389595191; Thu, 26 Nov 2020 03:19:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b088:: with SMTP id x8ls774050ejy.6.gmail; Thu, 26 Nov 2020 03:19:54 -0800 (PST) X-Received: by 2002:a17:906:4059:: with SMTP id y25mr2205161ejj.498.1606389594290; Thu, 26 Nov 2020 03:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389594; cv=none; d=google.com; s=arc-20160816; b=AGXT36dFzTvLNtg5e0riZWWV7xJrM/KlXKFYMfpKug8GmGCUwjGPTujkhjYYQWjWB6 5j1P3iHYXhHZSqNWgxWoqQU0VUnywR2acCZp76nniVlFo1G56/a6ovcHuBc36/Vxt0yT m+PPR2a0nm/IBwzxarbIp9r6jS9ygmY+upkpnyjbaRlZh4R58BCEmhJR+q0OkJdzR3Yx D+x2s+6O1CosmUMZnYsmDABsUBNgzf5snrOSQPVz5kn4rw++8BGpw5U4GfNuQqqspMMF C6KutdKB4Nv5iCWgXKtSEGa6QsKQzprlMFe7GTNqTW4fKXdTyZF66lLj/9G3Xe2lV9xY geIw== 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=u/YjXdDawB2IDjRHzr2L3gmAx8qCDgi642Q67y68bwo=; b=CCHeos00nwRQlDkg+eHM+9HsYVVBCkgfD/g2MBwZxk+1kmVkjkCMrOUQjd9yBhzB7T X4gpL7mGYg7VUFbX2a62xVI6h5Ch3cRlc47X1P43EqLtF+Grzg+KgLEJ3lvi2xch3Vtw iEe+QIHgPh5cyeZ2h9wnKiumrnulPZktkUKPaboqB8TXWX4voCfdVAxQRoql+rn+u4Vy vEkzYOUdrN0Lg1n5X1m8p8lSgxXQE8jse+9QK9i8uAN3hI/q4v3o6SprKZXC+rpDCCD/ e/saeQavtBigRDEYFuW9FOpcT/4GAHF9gUWZNctZePcH+d+o51SVLSXT3hEfT7udcidi jL3w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.19.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:19:54 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: H7PQ8dkqVAUHziVE+iBoULX4ZtQTIHm14+QFnwsyS/DjGmdB3Gia1obwxL1+ucGCU+GbtCddpf X//C4xoM7QDXXmxKSPvTRbqextvOhgixEOFvShXh25Z6MPQIp7/lLhXAjXlvRdpjfavLSINkQF giIgqSeF413FbAvJpRgsUUKG+M9G4/3jEiqopwmWMOa9BqpQ1tZiELk2LdgJHAqrg+YC7jkdZP qBPzlo1Gw24cyeVDPwZngIKF4so9kGsOrYkzYswMInfLvPSs9z1zRZDuvI80+1ICes1uVF5PK4 mh4= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500404" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:19:53 -0800 IronPort-SDR: uskSppOJ9FlXSPTrM9BYBTzJuBRC+3jdrbC7C0elOMjiI5RS8yHPsyLkRT4fN0hIdNPeZJsJHT OttUgn2zl46ulD/ZdbSbKsciuPGVi84yM4RDvRsbl48YD6uC8/uL/RCooCxl7z5rHR9IoZT/gD ASotsqBY7vg63N7l/nWlGUowjmAZOIURltKWhfC6jF6KHt1vB8KG45X4AJO9bVaVNUXDDly6e/ c0QI3ElWN5Xp2v0QkuSIfqoMdDBdXuOTUnUzW1hLau3ZsJO2AB+rUhNQSkQ7CycIc3RcqKRrXh 6gM= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 02/14] deb-dl-dir: Cache host distro debs separately Date: Thu, 26 Nov 2020 16:49:00 +0530 Message-ID: <20201126111912.3037-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421576349021937?= X-GMAIL-MSGID: =?utf-8?q?1684421576349021937?= 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 f9c8995..fb4a3b6 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -114,7 +114,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" @@ -131,7 +131,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 9a5ebfd..6b2e5a7 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 01:19:01 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: 226 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229412oou; Thu, 26 Nov 2020 03:19:58 -0800 (PST) X-Received: by 2002:a05:6402:1b19:: with SMTP id by25mr2007716edb.108.1606389598603; Thu, 26 Nov 2020 03:19:58 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389598; cv=pass; d=google.com; s=arc-20160816; b=zVY5TsIQHrQnw5hwSS9RR4/i8udOCH0U9Ftpmcu/ydNcDm/aEnVYtWjdpNAuBWugWX 2MSw5FsCYGZ7OBoifu1rvBy29A+KfaLh9uUMRsYJNRxjpGZdD+RdT6E17ho+lrzfbGJc AbnCgIX5VWPq4bxusGjeM4uKJiRyuWZoUHXVpE9YmRN4iafwQ4KrlbZY4fRWdorqSCcK Lz5w3AwOiiVmvwzeDwQeZIU+DGU+/EU8jz4rp5SrQlnWWFjx3fqM4+x09muQmZXt9eOC /Y2d1ZSvaYx17dv/d7YsiWj5j7lMwL3BANksNns0imOBo6BvMIPU1WLPWvi2VBuTbiD2 3ukg== 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=zhBMLdQMAMYgGLzPfr/zOXvseTorVRCUe/4tf3Lak+s=; b=ROyGVYULMHPnbJVeW+yvXwreBlZvwFmJU1IA9qw7qU0ItR31b4lw22kBrQgNb/memQ +Rp4ZAD+t9gGNxHUD656qw3hBalW/7s6z1yJjTD1n6PQh6fCFHAsvYU998C+xBILmAQJ 5mO/WUX9NbyWrEfERfx2u4PhCwc8K1Nw/AUyq9axRX9eBNugfIQoOBkl6UZC5aEG+sA3 eG6AHYOjL2jQ1Jv3/5aLiPQ60gLjwJYXha0uLYjyrDFkvN3A6lmuzFYcARoU1yXe8Sth vTNuxHKoiGmmz6lsrvWzDwgDZFyl9VoH5TOxmW9C8lnOFDhDIRUiIwH9dcQjpjX2TmcN 4nkQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=gAC2rxgM; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu6736qkgqeenkgsca@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXU6736QKGQEENKGSCA@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 n11sor2801712ejy.5.2020.11.26.03.19.58 (Google Transport Security); Thu, 26 Nov 2020 03:19:58 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu6736qkgqeenkgsca@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=gAC2rxgM; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbxu6736qkgqeenkgsca@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBXU6736QKGQEENKGSCA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389598; cv=pass; d=google.com; s=arc-20160816; b=jQkeCRACkVddI1TcV5uf8xXKfYtCNOGNzxWNK4/Sd9IITJs2kl1S2BlVDdQGstZXYX 2IC/EgtpQXQdNn8T6WLpvhJkP9NY9hMMtQLnYiurpFX7nQlBlBGQjc0e7AfjC8tIhr0o +/jzYvUvXHmyzrrcpzy6D3rSRu9SeRXWMoWifsY2/psqb455IpV/kv8pH9wVJI7tbb48 HnU0P63ITUhh2Pr3vBPp/zCI8wsIzOu9JK4JV5g3M58hsQFit7XiKKZHT2XkLU2JfNJb 3zK6Q8WFDJEqXiEpNWjJXTuSsEwA5lyLcTM/n/1jxz188+vrHM4azruwSx4kTXb3JPpm HISQ== 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=zhBMLdQMAMYgGLzPfr/zOXvseTorVRCUe/4tf3Lak+s=; b=YeEmdgbfpaavjf8J61ZvnvARycsl61BiCdWeoxX7FIAdcmZbjlLmLGrAsAZclQjowQ kMEwGMioQuGcjZjHcWHsbmoHree7sIBoiwO8CQ6Fd0vzgf16Khe8hMgFnz8Fef1etCKW /UOP7tk14J9zOK4gBrSkHiMR8YWuA+T2fV8+ePHU9cyqDv5ApqCqoXCWyHFK9e3uSMrK hwcMRPMsdDT2GyanaZb8VTwOK1/HRBmsPUy4H2vQwIrm5nLiclaX5h5tGhBOhcZ5DnWx N3+AJOAmwTZOgzHLsjyXxGfDRX3bo3WYTD6Nexbumc2y+k3MYImLVU81cwqaq2EBzXOy wQoQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=zhBMLdQMAMYgGLzPfr/zOXvseTorVRCUe/4tf3Lak+s=; b=gAC2rxgMTKqhOAj+7uoKEyJGUXiU1t7t55XAt2/NxYqsAlmnkJnY+XbxF8JEgEqlo6 HJv+tBqpM42mKV1KBqK3GQap3gY1x4WMstE6YWzJ/Z6tkffydub25T3FZjBMMY9NSkz9 3UNnSRg/oOgai2tzUQ0wPtgxYa65ggORZaU0OfhrlNZEv6oQg1cSJBYRd4I21yQI1Ezj J9PDl6LapEz/5rSzF6X4N2P62wzWuk19sRCj1wkFS57QDLXF38rw7xFkFqfH1/tC28de Ioh9+4fpM6kOROW1I7oWwsFoajLEemTsOiaW/+G+lY7b9U8kjXzCG4H9ZQvGUhWcBopL ehpw== 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=zhBMLdQMAMYgGLzPfr/zOXvseTorVRCUe/4tf3Lak+s=; b=oJwzECe0UaEZGxDoE3dCM6VkGhdvzj1iVkHKlHR1C0oBJrun5WMVjeuyAz2pQLGA7n At90vvh6IrU3v6hxcL4yi1gViVuZXwmPQaS4EruwpmqsxSnBBHuvltFRAo9BR/Jd77CL RAEY5u/gE7qmmhWdIebOgdpMkfeKIx59I0USKKR90aqLklhLQKltoTH3h/cczA1BDwiU mvStlzHn00Zwu6qjgdaiPwPModKVVTe8/5CFzn2HJgcSUG90Z5H13nHfWid04DMHz60q XhZqNfhiGhPlhb5mc1F2SFU04r5w6ofxD4sFAaAP5sy5RCjwd6VlHhz5tS/IIH1cdiU7 7a0w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533BTk5pMuQF4X/NDpiysKWx1w5xuQ3fmyXIYbB9LpSluYq98Lfg wCo4Rv3AUjZk76fNRC6wVKw= X-Google-Smtp-Source: ABdhPJy49Hdk5STcfqDzjciRdH9r8nHaYwAFeo/n3GJ7lIUUupX3lD/BtTPpQcYEYZw7JxqIlSZzvQ== X-Received: by 2002:a17:906:b74b:: with SMTP id fx11mr63389ejb.410.1606389598223; Thu, 26 Nov 2020 03:19:58 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:4396:: with SMTP id ne6ls786387ejb.2.gmail; Thu, 26 Nov 2020 03:19:57 -0800 (PST) X-Received: by 2002:a17:906:5243:: with SMTP id y3mr2204686ejm.273.1606389597318; Thu, 26 Nov 2020 03:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389597; cv=none; d=google.com; s=arc-20160816; b=a5AkC5DTPk4EC6DFnNEpNc1HRI0qhxstkspkpv6acKzzWBcrl4lZA09Ppl8+8MVtPU lREpkY7HkLI2r8ZKm03HcLUW1O7r2OzkaKt5PwAz3OZCF2+PJNh4COsnGg2iJ7mCO8qD 1IGHXqmz9Qqc5OzpcUqpAFQcaowfLf36HFxgzf0CbjKLCGMe+e4C3bO1MXf2HuLEOgf1 pec2JYxN7ZeLp4INuMK3Sd7FtkAYWQOUt9Ju8/y/zX4fle+az+xQZY/ux7zdXrrzdAgO OBkzVTyHVtIC3fXEbn1OJojs4VT/fILg4s2FwP6Z7vpXmRVSHnMWYHj9C2/By8BxlqYJ JMkA== 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=g6o3FEMkxlNAhWF1OY7uNQec3PXFHgPBHp5sy2uT8dk=; b=g7Wy0st3R3KsR1nFger+y5Z0Z9Ap7KNPGlq+Kf5yb9/8z0fynVTFL95YDBJ9sUaTP1 d+tdyXfxgplhiZkGRB/AWGMsHjgzpq7HDzsdfCs+CgHAGgDhmBkPEQSoSIcKHvp30szz +KuYVmlGdGOUfYjShEeheDfr9ULa0KtH5QViz/qeW2DNmyxhd1KKf0xiaeHLiB0H+8ft PIr+NloK4WDJmLvzlQ4wmiw1ml6O6UpppL8auB2mMn1waLVukgqSgMCngf1Layg98X1t 91nVyWFq27nUxlmT4SCjywFrL4IT6jpzdaE5qN1qqb64dnnFsybINgefLDo7vHNqwNbO lqTw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.19.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:19:57 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: BoDelUQ/7I4WNs4ABha10ygu2wLFamgyxpQvsLx13aPOFo3CtkMh98kAVEh/wVRJmRGwVlyY2L xXNKIdU6Fvj7FUwNAruyPZHGTRo5nNFnnF6PSX4SiuBMXKOGRIzDuM3uK720gF2ROKhURAd2Nt y43/kYlBqnk7EfJAUdA+Qx6XRzQUAohl1cou9IJNBUDnuh9DkXh9Bz30+MMo4D7WsZQnCi/462 MU6ntIFPBRoUTsjuMvuRv6nwDefmpT3kZFeLHQpBwu80c4z+CJKMp1PGfNbIKf1dMLTZOVqRKa tNM= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500408" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:19:56 -0800 IronPort-SDR: b4jZY48sgYBG7JGwFxrqA4OkT3uK2RgOCFkVodsEsiHMA/JtvCER8J7pVhk/132+EVNpWRvSsY 7ja8v4BheQs+DoFRMSTT7DFkTpto2fSEkBvAAB4y/rs76Eyl3Q+1eaqQJNsFe3TvPA6SW7VDr0 4bg50vBFBh8UV5a4yzqM6ZygQEow3gauMQb8Dg7cApUdslVIbsPxuS+oBlatrhdLN6r95ZxuXI cZM7tJDVthjl7YLyj0qBkrJVP3RVWt7a7hpG5rlv0aUKpT6LiGcV1AMfB76gcGOBWZRc8bZkQh 664= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 03/14] meta: cache deb srcs as part of postprocessing Date: Thu, 26 Nov 2020 16:49:01 +0530 Message-ID: <20201126111912.3037-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421579422889291?= X-GMAIL-MSGID: =?utf-8?q?1684421579422889291?= 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 2391529..51cb2e1 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" +ROOTFS_FEATURES += "clean-package-cache generate-manifest cache-deb-src" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index fb4a3b6..f972a89 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -184,6 +184,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 01:19:02 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: 227 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229461oou; Thu, 26 Nov 2020 03:20:02 -0800 (PST) X-Received: by 2002:a17:906:e2da:: with SMTP id gr26mr2088956ejb.265.1606389602227; Thu, 26 Nov 2020 03:20:02 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389602; cv=pass; d=google.com; s=arc-20160816; b=jIr3Q8imhPcvfmB2luYkGeBf5WVoQ7vNK7qKeVI6hGgEFDmHC+0uMqKtz4JtgWGy81 1PtL9OHze7oyhikUG1rjHTW31DMQFvPk9WUCUaVsbTjCt5M2OECglIpRCtmNq25rbmmN RB/gUrMgGLSaves8fA1mSy0xzel0YqKVb/JcpVBCkvdXyOOAz+FRLfI6nySPdZ/FvbJn Hs3xNIQsoizKjAqHz991nLXtmJiRk450boOX1sqVBydd2UyWNGZ2Vy6kR5sA5ULkiqXY Uc8E9QSJClFV7wlcUQ7SFQJS3im+pLANwIqgw03v9aboLM67D6T9v/VTn5Y74MCDFFwN S1uw== 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=K7eOQIwC+XxGHh1uf7gmc5nDqZ5jBKNzZjCyCTjPf6g=; b=pIKM3Mn5wJ/qnldB3PDPqr4lRmIJqxTxYLgP1BjusBzc2+dgAN6X1CZY6V/e6Ta9aA llGA1Khru0eih28JzDQXhf87z3yXHXxGFHFxH0J9j0w8m9uNxGq5f5f0qDQNGLCb5FQ1 75wRjLJOstDECjs1nV0QV3abzCsmOg87y96DPfGnIoYSkYYs0TPmWRO7Pd1YqfOe3LVP YGevL/BVLCUX5uZNFwqLml0dmy6jD1mwfwZ73ArsJl7GH8T337N8t6iCqpKFSmJcbdA6 ycBqLlSJkhHwM1CeA7k92Y7a2iiwoN9OV3Di+FB8MHvFuFXCriwshpIwI/jmoxyNW8DI CVOw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=bUuoj0UP; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym6736qkgqek3wn45q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYM6736QKGQEK3WN45Q@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 lz9sor847691ejb.48.2020.11.26.03.20.02 (Google Transport Security); Thu, 26 Nov 2020 03:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym6736qkgqek3wn45q@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=bUuoj0UP; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym6736qkgqek3wn45q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYM6736QKGQEK3WN45Q@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389602; cv=pass; d=google.com; s=arc-20160816; b=kl904KW6aWS8aG4MHRo8rewrw30c29sY72CIaHuC8YkxaSX5adVYocPzQeekPMLfeB UX/JHpOGmu4u3xrU/1JsLjG7VHxzQzgW+nBgV2TVeSW0nwFWFDcbeSV8iLYWN1Ccf9nj H4EESSkjJWaK3yrX0/HIIb2yuAjRGqIQ9gnMZs6gSYSiTeAP4MMv//EQhpvg7VQ0c3xq GWfomUGmrdtml1oBvHDzbGX4XOKK83WSJSISWq6AgGy7QsfKWq1/wUbc7nmmviHQAsjK SaU4ieXEFbDxmUf9uFcoUXZYUhFYlsW1Fv/B4sGFb8vpa6Qc0aEK4CouclI0XewxfNaK p68Q== 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=K7eOQIwC+XxGHh1uf7gmc5nDqZ5jBKNzZjCyCTjPf6g=; b=icPXcLEAPqwOXf0WWwSb843QbpulaVjDgf70M5H8RHXmnKRabKtEHYn3//MMsaoAAs 2ZdVCrMhzba8hz6N0J0I9MIuZm/VosD34djWILm65Xz0lJk/0TL3Gvh0mwqmlhrBAxXH eAVsZyMray0+XjADsfdkWE+WWLZvZrrGhsR9y8VPfgpxC3cbwUaIhKN9M9D6h6bDdpwr z0yV33FS+xYcZouESKPxaWhX6eHNCCCWQ+bHD+CbaGJqGjzOGCTHSHUNwwkSbzluaMln PS18L3TTJpX097hZJagW3J9bBfdsROoNoq/pnO3bshdRBuqe/Hqpf3tuwB5s1sI2Ihh8 DaMQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=K7eOQIwC+XxGHh1uf7gmc5nDqZ5jBKNzZjCyCTjPf6g=; b=bUuoj0UPAHzsRziLigZUSGm/28+jdtHcXcpxMh9Y882vVCC/q1QhK+pwwoXaWA9KiD gV5c1DleUUK4dH+I9pUVZt88fqlUQfbyQgzb3S10QF8co6B1xosc49eIEkckMSNsiPVr B2iC0Wcgaylf2GiwzHhkDqWIgVOc4HujNsfLorflBkSyVqShl814jiE7Aq8Zl2xNWqKI L3XEpraNqM6kaaZeYMNC+xlPGqFz5bxWT/CIIahVbxuoVsji/0fyi4iVuuIfgOVolE1u 3mO6x0DHKJiiAgpu3JayXG8A+8FZvw3Y+19yhwALiHBqDJgrzcuewzEOAEFGtKQzYtrC 5IOw== 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=K7eOQIwC+XxGHh1uf7gmc5nDqZ5jBKNzZjCyCTjPf6g=; b=uFdc+DuObXHQvo8PcF025MUidWNu1ce7dus1PI0goj5AXy3AwuRSoKNAfykqanG8jE DqNWZ/pwSd68SRcI/VaqOcPIgZqHmZ/CJSKFbExJY5UCWcNVgo+r+P/7A7eE2LwQgnoj apyt/k31TurDw3O+gQMQohd6KpyNCOBwEL/ZMyap9RC69AhWAyT1A2BNxKoJDdLWkeQI 31CSv3xLKLjXIlpEyyM2mnqN6DHxWGevcnuysrVpggO6PhxFzXiC/N/rc8zk5KRhQe8L w6N1FNdycgRd/U4e+JRK2PTqn0ebcZzyd+cpx6dXYSqr/sS+wYufCKKTfWFi3KtO9W/C RmYA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5333Gjr1M+FmdOHc4S411of62x2NyEDoWMUkicGkqhpydjDsJFyP EKorzC6j1GGbgpcbfikrZJk= X-Google-Smtp-Source: ABdhPJxCqoA+T80850bkH1vEi82EwpPCiUwWFP2rD4orLY4Vc9JhXwMFO0FWN4X/mI7fch9Oo4q+MQ== X-Received: by 2002:a17:906:d8c:: with SMTP id m12mr2220615eji.310.1606389601940; Thu, 26 Nov 2020 03:20:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d151:: with SMTP id r17ls1870841edo.1.gmail; Thu, 26 Nov 2020 03:20:01 -0800 (PST) X-Received: by 2002:a50:eb0a:: with SMTP id y10mr2114075edp.342.1606389601143; Thu, 26 Nov 2020 03:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389601; cv=none; d=google.com; s=arc-20160816; b=G41V/AQ66qPJcqMczBPgg/Sj8rmyABzSqS7N7ysKSslKCcXCnjGhQt8Cj7VRE12fyh KgkV68E2JqeWLAVbu5fJuz9BHbLDQqekd6RJ3xBjr/V6Yn6U5FLBvy6zhmdmE/p028Lf GGVVCJFvVlj3HLOCZVYAGyStxXbcIkYBDwiIQO898I//c3+fFqgW6woRdVtFBt+LM0X2 QABPJOzoK4JNGNm+tntg2K/cRZklX0TJCNyHrfLoU8H7sSNqyz40NwzGJ62uxFyvw5AI LNYE1mLvGmoPazLkqFyrjrm5tP4J316ZF/+PQqkNsQkuasfMP63kOPVMg37+JSUmNQQM VNLg== 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=WPPnbtXH6GWwbEZ32CFubZrVIkHS4HJ60Q+jp2+azPIgBLC3KadP7YdVl1+dftZrH4 0fUYqFi0IBs4oHsszQJ8ius0NLYCH+gIS8Lc/zovzP4afaZr/+5jTLGDp99GDZFhEiHD 5YkOZgQ3djNxqz79XldKR0XORZNTBEZTQ7zM5YVXahVNyp4UIvQr0RGEJTUNjSutcAfk cOOPMB/qX/SWTeFeAkt3UW6jLQxBOMZhGfvXLdVOgh2digf1rH3LlGSW3IRbEnM4DwzS kDA/0YKIpa0ZgUlV/yi8nJfTiXarSRZug+rvsTgNQQ9nYXOpDThY02wv4XcGbbeV1gyB IOqA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:01 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: xskqz1pCPQwyoqo9P+nGMLiWzqfk8kcDjmuoWYKbsOROp2qOr0sLOi0OW8LKLczHskualcV4vg MvmmQ8pMZIOO/5yB7smjdA+/XA2r9HLSdFN7x0NZ+b+zfG+mKw0aMgk3Grs/bR5iGi1JF2uHEz 2/Mb8Gdohh4O6JzawkH2H/Xu/kh4/wmG9cyF4ttacuPYSO6X6230gSQ7hiQgluOYpluPH15E3u mkE/ihE6v1LA6Ztcq183CK7VrKCWYSt+wC2+YRHgn/BLMXPetVoi8f0kO4cYTVCwj4TzGzlthC CYg= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500414" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:00 -0800 IronPort-SDR: 98EdqVR0DhoRtxrkI/m+FE18wvs9M5dR2OtRIUfpVk7+0t2dFpgJx+JuGZgoyORKKuKfXzK57b lvnL3d0JBC/WHWyeiu4+o4C2Fqg/+bqvhGdRepTalsEwX9MjtXHqZabscFVV78jviiJs1Zkohp KTVXsJuHJrW0qM2IiWeH44CIEzG5cJ17SRvd7kJk/TuMMphwhJYf6/d1WyYamRjiU9tJoyivuB Uz/1D+8016FwPo/7OUJnTtjgfvgczihfYbBd2B1dI3EqYn1UJJXTMjhpdhAwJZSwXRMT2oVcRq uAQ= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 04/14] deb-dl-dir: Make debsrc_download faster Date: Thu, 26 Nov 2020 16:49:02 +0530 Message-ID: <20201126111912.3037-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421583132604465?= X-GMAIL-MSGID: =?utf-8?q?1684421583132604465?= 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 01:19:03 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: 228 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229510oou; Thu, 26 Nov 2020 03:20:06 -0800 (PST) X-Received: by 2002:aa7:dd0d:: with SMTP id i13mr2051948edv.174.1606389605881; Thu, 26 Nov 2020 03:20:05 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389605; cv=pass; d=google.com; s=arc-20160816; b=LVJiYhn16AJTI2XmlVFbxWBCPfPyzxhBxkUfZnPxSCsRuUDyo45uhgOdlW0H++IKSB zkIrSSXT5hvkF8gD8COwQQCAnLIjRSF/0s1LWvsrBPaA96wrsdIbigw3D0zOfg4pOUba icJ8Fo9Q8cBbkqgPpK/WfpsF2brs5iLsKgCrhdPz5JZ/fZmtKxEnPmvvs1WeI1VSXNdw GeYM11TRUJFNwnk/3arULN9XK00gx5/EPe7BV3vc32rX8I/rc/RYRc5qACVrYNHKJ5Dt 4KarpNkbONW55MPnWfd+Xhq0slr+kXTfGMlSAKkzg+Y9CAwHqBvHMV9F8bpopgVxEI2J v1+A== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=b4xEqMRHPBs8Bug4ue6t4LU8YGACif14VWP6Yava1X63zCGOJm7PB1MhJ60RHwM679 O2YCJ4EjvEUwXRO53I1OmawruA/dQl1oX/fLqYgtmjYuUB0CtDW1SXVCxGqH/hkt3Qf1 9CI20FncqX3G4oMOxcHR+ZEsfiEcjWIW7itR7hqsvzWnvO8kPo+zwaBkHReWr5esRNuF L/mKsopzhQ5XSSvY+I0KpW1/68cPlZR5NhburIJD67EH6BJKceZPRygLl1DcmpRPAD2t ozgbLu+FRhc1RwLoveT3/RuHWuWvyCHXQVD3qITwlKPedta9eCdlKkeKFLDBQzGYuWn3 2WDA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=KX6kA6I2; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZM6736QKGQEMKBAZZY@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 k18sor3333235ejx.47.2020.11.26.03.20.05 (Google Transport Security); Thu, 26 Nov 2020 03:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@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=KX6kA6I2; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbzm6736qkgqemkbazzy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZM6736QKGQEMKBAZZY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389605; cv=pass; d=google.com; s=arc-20160816; b=Bu6WnWfFsaFB1ZBAdMbAD4z/eoQyHZzHdaWseHWjmk4dkqOWzAN6igj7Wg/MIheW4P TM2njWEZC9EQogsnRdpxw3bPC6FZhKmUbTmRATl+0KxMKtSHqKRsnPN/BIEjQhNovs+O gWwz55HtRpHx+iA4WIVuL8rNmD21567fIUKcsZOJEzvwU+K/Ph1F7RFyCWSbBCwuRRjc 4fHrwsRxh0N0UcmNwXjRf5XXWjReK6mDPuPJ2IVIPfK/tKc6sbpFcutq1xtl33r3kwXP EQVdvaE4yowkpDJ+nbLw4IRkvnhrxFwDtCkaG/e6tWY3sL+/GSv0LHh/XDVnq9JzezSn LYVg== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=gSgqITFBPbnZgBqbZaIHvfeWnnIpXoRGFtiTuB1hBk1sGnuH49iznLwLjw8IAqZleq BrfexPjkxshjugxECWhOt9CJ7Dc0NvqOTBGfrxZ0bZQ2zJttdm9KTwnx9ebU2PlpQVz0 kvhjAVLWBUe8YesUViIvJlsZMKA2ov21e4UkuMcr2FvKS+txk7fLrl43wrbeT1MV/Yui m/Rq6mvnfYpVG5SJOl1OVrRfjoGSmE7yfMC+IuvR5MZ8htbCRStYLJs/3KkNZdOJCyRI YiwWFtsVFeY12Tp/isQXufi1d97rsUCHHFDPjJbAemt2eUo4ZkllPhMPdJa+nEBvdkJP bk9g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=KX6kA6I2JZhWdK/NAXwXPOwKp53LfvY7li3C+CHM1Ng2gkB/FSlamkaWObZE8yukAP xmd6/G1RkZ/3XZvXvjvvjatkYquYSYkrp7NyCws18J5yor9ZVV/EbWn4m7j3VKWrZzA9 UOeLRr2L6Vy305qpG44KnQlF1WvBGZuSIjjA1VNhqzGgJnUSXHeT5R4g5hK2fIM/pNac qs7KQQhbD7mffFvm+yuGHqVX2cq3G1w+s9SBnxfSydBmn4Dq9Xza8Qg8tB5oRGsFfJ2J 2qSQF/yisAoPCmBta0peCEyobM/L8JQkBA/Ww/vKJoDs+krk6ULx8Fb7DyI8W0DMUMY2 HpJg== 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=hva0IMb3NAh/9mhYZHwUSnx5pHIBXgdTo27XjqEyytw=; b=dxyTs2NLnJCv0qYqS923DMKvPyrUbNwIjBlx5sLcvWbkHSCJfiLNsA4y9Bj06M7aet cJH0tF4AJ7BSesl8NOR5GydScNBWGU2Au+p+oXwpQzpoi+vYNLKbzidJ5nK+Yg+4blBC QK3H3YcMYzoLIFqcZK3H667vt5a7Zf+i+1jDxe1KJjRWw1N5kw2syYebU3W/5iKK3bVj 9/avsd4t+IZBvEfgKr0gqpQVS6Acr4FM/LAKBxHUj7rvfO+j/9d/w4Go1DWQVRu6LRsn nni7UKap7PP4pYyRjqrnjCw5SrxvKyPHmrX8tJK/Pn5odzFRijSmkn5bY1GqffjfXMcd 27Uw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533poVNjsKh+6aMHDCuxDkHkwWQmtbS/KOAuUXa0YvuRonTRLCWI cPwxTC1vPYjpkQD5iS+Uk1E= X-Google-Smtp-Source: ABdhPJzOAaIt+qo7/RHctzg+j7uty46QKjI/fybFJSCGxk67ylVc3ClMRBDt8YAo1jsRg+1cJFPrHg== X-Received: by 2002:aa7:d34e:: with SMTP id m14mr2037959edr.42.1606389605553; Thu, 26 Nov 2020 03:20:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b088:: with SMTP id x8ls774281ejy.6.gmail; Thu, 26 Nov 2020 03:20:04 -0800 (PST) X-Received: by 2002:a17:906:f881:: with SMTP id lg1mr2134383ejb.133.1606389604753; Thu, 26 Nov 2020 03:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389604; cv=none; d=google.com; s=arc-20160816; b=qsqtpZ0SqO2hLIi3LxeZNpH5oph+EsZHqr5KV3PejiaNKA4aucGed8I9p15crVC/fh RQrMUCQBElOMShvDPcOtNIheItrH+3RsApMovPzYLJgLWuybL+UDUmuJybcI3IIo6ecT MPzj0aP+CzYDMo3J56UuhTqdx0K83UAwUtvv4ox0NVbmp4OsXuE6xp9sM6lQwbPxhWVE jrrzT2VpKYj5PDljxnQgFHl+D2/ZfsTxQpn0UwGJCRzKx+kD2OBmzwk0sKzYmV4h1MnM 91ZuA05fMalA9k4PT/UtMOqTRzV05pwwOREG07x3REhgCtPH+54TnONikrOm4DuvmNx6 NsPw== 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=LsK3RWeZ21+9gsTYf1c6xS9YR22fRC0uB7teF73Wwt9BOgulpu8x0/pHeBrD3uZvto +jXy5lvPNky1dBsrp8fwcnDArkKDKhL6Q6taGWoRtAKASN4Zxe7UUeF3Ds233sqoTyNs 7NGTx+Gwqm61uLNtB/Qzikx3DaOiQd/VpMzSHGZaZmDfPtwbaguc3jkqxIF8y7ZcfzWW pu4TNeF1+msmmB/9pkssQV5vgnH2J8EpshC41QLdYohexklm6FlHD7FQrlYb9MjOLnAq wT4+3SdpoNfndzGT0A/Sf+DZMand75iajHVnleiA7G5LcgI9BN/Ns04gHVmW5OanziZT /F9w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: jhD36xtA4eV02JbzMFOYB8T/4LFuAxZp8WSS22CmezfOSEXDpoUSRZQkLL6PyaxiRpRd36LKyN VUbWNPk0boZ8qzqylDf7BN3aqYtvYyi8khc4rrCoB0ETFiGjcESXRxKV9CeWHZ8gRBBgm0yUaD DFZ4qJQaHsuN7z8w97ZJ8Amsa3kDq6k9FVWC8toNeqdZDJFLf5JzYnFSOj2uqvMto6Rewi5tth a4XZrXF64AVS0jSWghlI5itab8gqjff2qQ7HZEd4szkgyBQEWvxsEBAdFd5SxerNRTn7YaXh/a Hpc= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500418" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:03 -0800 IronPort-SDR: punq1KMA7sMysw+GakBNqQxky9QnOQ9AuIn7wYkN/YaX5K2uGzhZu3ds7/8H1tdwNS/rugdwaP RsIhFAyfVbZFCpIr0gjVKi/dRgyIIYon2m0R/DTQvrSZKFqUGNBic98KrYqDS7FamF/GvXzSzQ LGaU5l4W9OiiGEQ/3PbcZgEjNztn1AiT25ddtqV0UhILjtBO1r+O6q90EwquCJ8Re+LbBRq+wC 31LTkAEW4dL/4qsqaMGBOmal3lGx2Laz7OJ/MtlYeCwzUby88VnZ2lxLtWYk65EwHizBopJIJa pq8= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 05/14] deb-dl-dir: Download files only belonging to the current image Date: Thu, 26 Nov 2020 16:49:03 +0530 Message-ID: <20201126111912.3037-6-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421587152075917?= X-GMAIL-MSGID: =?utf-8?q?1684421587152075917?= 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 01:19:04 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: 229 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229582oou; Thu, 26 Nov 2020 03:20:10 -0800 (PST) X-Received: by 2002:a17:906:f744:: with SMTP id jp4mr2272340ejb.122.1606389610397; Thu, 26 Nov 2020 03:20:10 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389610; cv=pass; d=google.com; s=arc-20160816; b=wqaHyxIcy1mYyoWtLtGAakAgnth9aTQv9sAyDzJyHKsLHabvD+AfSDFOWUl1HIxKYq hFgo6kT8y6iWm489e7nT2LWCNaMfdWikYVScR7+kBrxvPo2j68NuFEFElG453VMWow6y kxC7/zdBC0I3IK1uQWZQYz4u3Bh4LPdOnneXYj1KSy49FBWdhfU2mWGk9FZePT83wPEq uuEShSVRNGilf57NosizbM8wPqcFQsw5yeiHBrIE0RslZ2cUIpdp41dZM0MSb9ndcOmf c6cn9KiMni/VroB/DvRHXZOO7ZTTr1Megm3zzNwkKQCMwacSwqm2V+ZG3MK3l+zhc1a3 X9Sw== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=lX1LveTENgbGBLaco8JMMFTqhq1tRdvCAEWYH8NXV4bqApTAVJsob9An6gT8kyo4gt 7WrGfuOk2FD69MwzsM8/xTl8K27gyA+pE9Z4tSXtXfQAQUkH+mgfqUgEx36za6ckl6av zS9I55X+Fxjb2rqA1fyIvke4xQ5UCbRUlXCngP/Zt8yOpXZo4bEDu8D2qBEyL1LHGznu o25UKrshEXMcf+68xsXEk0GnK/uOKuDe2U8LYjnQItv7xvcOE6ckPw6OMveBfflJpavr PJ7rn4poBCrDrH7TT/rubylFA5AWBXFn2SuWRD4BJ+TJNJbKo3KfD1a6RfJj7Zs+hVMW Fzsg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=WKvNYv+d; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2M6736QKGQE7WPO2YQ@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 rp24sor3287729ejb.56.2020.11.26.03.20.10 (Google Transport Security); Thu, 26 Nov 2020 03:20:10 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@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=WKvNYv+d; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2M6736QKGQE7WPO2YQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389610; cv=pass; d=google.com; s=arc-20160816; b=HunyA3Ce+AzKjZJiDYkQOjxvqHwqldsd7HVJeIESaVZzqKGyRzukr8qvjAG2PIn/Ue 3AERsoU6Oag6nhvVAUO30h+LfgbN4rw1Y+CyGICoNW8l3yEfri9qj9gzQKb7rc2jsU1b 9U23oqRW0OZUcAdggwYXDW/rTXCstbFnSZHWuQEnx6IpdjrpRALFwd7my+fhuYB3E92T FVKTxMv1YCcTu5VI4lbHmbvHOgk7tPhvXPBGk0V/kYdX4sGoaskraTJxS4uYbiY7EbI4 BEC37fwZdVPdeAd1hPud/PijJMHSqqq19bEzcA6nDBuRQlTHVRjr8KBjd4uC+/R6AYvo tfTQ== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=aa2Cv9WHdhTO+eVBNPVzrrOMVQBHOxZv1Cw1w0ePp1/MDXIr4dp4Lp5UUffjArD8dO ms/m5aWoa9uSS/RoJvb8qQQDj8//SVHJEzBiqOdCPtHrxA0pGjgQqHlusk4CPXY6KAUZ 0bmFA52u/c6FAs/bG+WGvKVyZOsK63xvkX7dZRHj8CrxXeZYnr8ozutsEJz5kasBb0Zy GDsBeksednHA9c4kl4yZDCPJLeNe/5JuyrjkQJE5bfrfjmUJXn0lyFd4Rp/CsCmB+qtV AGeyaTwDF8mlhiZ8Oy91CNeN5DRm3jQeiN1mzxvoOx6V4yvRiRGa6b0jMxSaCzOVaZzJ kgLA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=WKvNYv+dzQ9PnaG3ERAxyjVldq7IJ0n0HOyHUcW2HA9csKaTaOM9fjkGIM3sul0O1g gBrm6YxqeynCMZZS6AVY0V1gwoMkWY5OENqMYH0RVA5vxjtMVGB5OFr+Bbg4FYImlFCA +J2gY5MAmIYkBXCEwoMOEsuLKenY2tDVhOj5o5Ela9zUtiv0DfAIj2uyhZaewDVHhbTB skXMGfGiLu0N01olrwEvZH3RDsGXVT2XkvoyAZU11wxUGCDbfHzTWfB1L2u5J2mpCkwe w/Pj5IxQE2zrufv39g1sUllsHXb30xcz2GtHNkkxasDvR2GfCBGSBYyupwj4/OMV+hvQ zf2g== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=J2hHLQ/jU8wHO4x2ltUvOzSqyDYrHLBXJoXioT22KtKrdKyVwNDdLBpFdkmmrH0Ngi GzakbDhlem0Q1zXKnzL/cer5T1+J4w3IEtNEDRdooi4zIXtQHHWR+t5G4gKHT/RjCK+o jGDqz5KLVIuAnMGeZ7plUn5jX9KHcIdfVDwzpcKCjGxnNkyABXCHXbPbEUzNdxNrnqsD lSgbNnxoBEstXkdVPTr5+/RYdrVLbyREfpjT3otgenpVaKFlZG1ZN02CtT2Ukiawv8be iGg0rv+5d8tWEFmGENp2SNbgiuJweovVPMjrL7vyNsgsrnG4RDYkT6JdBHNOzPMGVeiM v3sA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533jJC3J1nYhh6CphuqK637VNUICkcjHj9gZM12KKjYC/LpAnyDO GcJrM5mpVT8JfBQnPUbnPn8= X-Google-Smtp-Source: ABdhPJxaTwGboHNOwvkvi/nHBzuqjoL2JIKhT8wCrisxJ9DFI9XUODJsJ2P5cnOy5qy9N31iOJWxXw== X-Received: by 2002:a17:907:a8c:: with SMTP id by12mr2201580ejc.196.1606389610135; Thu, 26 Nov 2020 03:20:10 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b5b:: with SMTP id v27ls772871ejg.7.gmail; Thu, 26 Nov 2020 03:20:09 -0800 (PST) X-Received: by 2002:a17:906:4059:: with SMTP id y25mr2206181ejj.498.1606389609247; Thu, 26 Nov 2020 03:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389609; cv=none; d=google.com; s=arc-20160816; b=yGQ1sR1aQ+CHyiP3ugpkL3+2D6l2p4NznMQWPGNDcdXJ7BEfCVch/whewaUsU03Vi1 zloz7ikYYYi1FwFw2xFdiHFvNk/MeTXzHxnypBaPPUDLGD7W+/g67nyOkxP1yB/YldHT lbC0CtH99xFVRkwQnAepOotDvL2TomzsQTw2tFVhS4QD9f/ahgW2HxNtlpn3L9iL01P+ /RP+D5nOgHEIFG6sNSSJ7hTJBRurU0CTP3rKs3TI+zepG9W5qWLmvAbxVVJINx7OfSDq 4fPViBJCf91m91jitcSEFh1RPx2lCZ0CgeJjeNfmmzhPO/k6z0xXISud3mruI6ZNUlTt aH5g== 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=lYRPQaVo3FzH40YHFCAG54Q9BbD1tQ9ulT1lW4zu2MTghVCK2ORXfX460ivjq3fdMf XXpSkWuq+sewD1CCHtcnTqiaiMzSB+QyBHVh2QSZ4+SuwzIcNPWaWbTm9kB8DYRvtg02 lI7uGm56KFIaQ1AKn1pPOkvgXPCXbgwXFJKMJId4pzK+Q5zn96YY7PktNOfaoqthas3t SP9r0pJyNRAvTo1ewVuHFkqJxzwaK20R/nhvMPL9Mivrn4smqkAsfHk7XOeKtnTwJvGE +FJWu5ixtsGyA8wjn25fidGeUutHygJrpQV6RfiOIQ74fT2vMnVRJbhmSZqIbvZiQCHk S8Qw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:09 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: BlGVgXuS2nm30FDTa8fNtlrXs5oz9voHCS0wOaVAcwdSajTunDRQonWdMHzHEB35NuHgPhEi7T QcWWrgqeNPL/EjsKj3tf6+akWdqTI9BspxJgbxfRAnVDRs7FdJwt15nwWJJAy6XM35Z9Lsnp5E SHpeLsaBL/yEK9qymoJvOadLAZgxXwZd05poKU0+EPIZVE6qYJYBSaMY78qvGVFaQWQxsy4g4e AfnC62NpeM8nnDdQafdiRdDdOonjnaZou55CgtdM6QvUUDYvTue6i/YGWA+NmksJ1QydH/MIt6 LIE= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500425" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:08 -0800 IronPort-SDR: mgABqOYTLwXhdrmXfUdZ4IhUCRI+Ymgta8UVArat7czAGtwGHyORLYilqYyD+359k8Ef1n2kDq fmdXorGRBLWvExUa9cjwd1D7zlN35E5sK46GPFa3KOxNMOGWAxM8Rp+B8cVnmtLwFlIL3s5miX BZYwAvfwGy7kBrEtflVncd53uIqwlk34+VPdBoYGjul5HQ68F0z7cgS448+t6Rzg5gwZqm3cX+ Nm4AhXWSp0cFB5qhiiomJtow/Y9IjhdT33HF3EwgSVXtzQ/+FNohiNvKH2Wrk5dw3O9H5rkg4W +yg= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 06/14] deb-dl-dir: Factor out the mounting part Date: Thu, 26 Nov 2020 16:49:04 +0530 Message-ID: <20201126111912.3037-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421591966652061?= X-GMAIL-MSGID: =?utf-8?q?1684421591966652061?= 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 01:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 230 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229615oou; Thu, 26 Nov 2020 03:20:14 -0800 (PST) X-Received: by 2002:aa7:c44a:: with SMTP id n10mr2051891edr.145.1606389613953; Thu, 26 Nov 2020 03:20:13 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389613; cv=pass; d=google.com; s=arc-20160816; b=RppNU0gYR4Z/hjSoeJCMZiqu1ya8BPZHRuD2vU+fs5INFXIGDnV5KLPFsc+eAGWSTd DazAKuKEdQi9v+ajcOWGYoVDajMJcxwHfLHGwxaeCU5yRF0VoLaoWtZ+GpybEzNKofIr ctJS4lf+LVqgmuquNewasrwD7cWzmOu0BopcAqryH/NoGMnl9MENED9V28aDat/oGX6/ dTa6r4bI0ZdeW0G+40yn9eWp3EflLOkiJzjcL3SNjrkK/dlP0Vu3ROeyi3Z0gKczZkM7 RsTcA6lMDhjCO3ukNl7ncXi07uMVCXlFYtTeZlxfVWigQg2diPWE9NictTxvINI16b2m /+jg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=x9gXADSk4diKzmTF7zUcUz7YrcTnhcP4SCKrf2B8j8rAk9ecrLdRMBuBaupcudj0z/ LR58XjJyfjffU+2xbeluxpRG6kF0+SbIvH2w6dTKNWb1MZKDg1Mhl0SmbTo0D7a7f3cR liFmAjFIMsOO8SoKALiA3ca2QTCuIN70AMuDk5nNrhc44OQGng1rM2SvMANozl9C2nxi Qe0A9s3J7jzs018bNmy+0kuEtJTTAFcB5I/bVNG4pS0aL93cuxjzhApp3Fc5EgFBG2sG SCgIC6hM3LMLMc8R8ZQSnY0WeLmG9LRKD5V2W+avvqyx7gOSCfl0/7ehOeyHk4TwCdat Cd7g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JBrvuG6r; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3M6736QKGQEEOVVHXA@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id lh25sor3293663ejb.0.2020.11.26.03.20.13 (Google Transport Security); Thu, 26 Nov 2020 03:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=JBrvuG6r; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3m6736qkgqeeovvhxa@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3M6736QKGQEEOVVHXA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389613; cv=pass; d=google.com; s=arc-20160816; b=WWKxOkWAGHvQfLmN74BJ7eCWJJeYi9ghYNpTqoKocEgmDoWjMdoJIH9164yzMYi1uh 3HhpQKcJYDwD59u2+NNgFn+8Dt+VcSwuRBTkUJjCs+6ZAtJfBt5Qg7oT9XQ4cp72Vdb1 xMn5vI+crgINve1D4Dd9Sk22IMgnoVfLp5q7XgIiSWoHQ9RoOtBpf/+uJxO+oO5W+VyB Qn/hzLr4QmL+5lM/eWAyuoEBHUBSI+eQYn2auYEeVB7v1aO9lM7VjWQrcns5SG51xJWb y7q/GXkopoisGoMs1qJ7UpZhdeeaq8we4NIT0tAWMd3xughrQgk4ngnbml27qa2B+W9s Dfcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=Y/L/hrX7R8KNRaX3/PAQ/EeAB/rYKmd9pxnI3MIydw2aYNI4uGgHxOTTJkehSbG9sw wLTVVmInEKBBw27bCaVatqUwCPDO4jCg12B7ERY+nL4z0rUnLkSMBtFpKqoG7DnYArH4 6NLtXVqzwutCCCKl33+8oFScDsKjwJxMXyOVWKJr3rF1tayzRlZJ8vXutAUwbmy5qosj EgVKlRyEHPL5B5W9LWX25Er5BYVhxwNrnWUZx9tleJ3GH/2MLHqQpD1jdMa4TYUXg7vr aF74w5uQen1nWU2sR1Mo9ZvI9B8GYKf/rZflHyxV2wvEq+dENpdBIVAMcvXbi4Omyq7k LF9w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=JBrvuG6rCpw6UFKMOWPG+nW/7C0hkGH6SK1jJ0riyI+gTg6QAFFLaV389/TwFYfDJu BYN6pCtKkW6I+feIF8X1iIOQFmRam2ObAOkvlQ6Ll8smVpSe+HsRLYLf92W/t44KzHO6 h4VX59wo02gN9yQR27D/ljSUUU0pAoMgBWFtb1iLJvtestB0uqC4RAKduydQLsMHJDXv CHJvFPGsSTXxHMyzGpp/WSEcba7wMuIFu+uVsyTCMwUERXmwwk+K53Wt6lTa2NiN6xwm tx0EMjEyaRYGrodYtB+eUK6KDMjCJBVPC4gtLXPjFAON5TezvUu0A1pzBS9v7pAMXgac O/0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=BK0xdUG1rkvAzW8raPVBgWwJsLxDAAOj92GqgKq4qPk=; b=OO3IczpxV/tfs1LSgft5EtBsywlKN8mHXV6JHAvOhemCucDdwOEqeJ+9d4sOVwrfvC /V3ALXGfDB2xXgRexISzrsATYn+dKymogktQewtT30hB0E9CMVnsoEfXdDy2yVnqBFZB vkf2HnaconKOFdHCS1Jckc7GT/mapabTOul+ciiPw/zHg8ef+jzpn4KkdBG/6dHEy1jC dH+BsSnxNi4zJ17MbY0qmvk2tcSp1rCyZw/pRYpC1kUqcCffZ+8WOsL/Ve9ykszksT9l bzjnfs54ords0bcqoz90VrAJ2idNdMcLiTZsQSc7uIwAaMRQCV1eswvr7FJnDYtS1QPQ X66w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532T+NzaDLtx0uLSNIHOpCw0DLO2IS4kigQMzaOXNI7iHuA9IvLr AfHNgd5sqb+6Le2/RcxRQCM= X-Google-Smtp-Source: ABdhPJwlek9k35hWKCDZxB5jH5M6lqMIR/6DVlpGwV2RRRgsBoOlReDN9P34aoiyJyScrNlzD/NCew== X-Received: by 2002:a17:906:af43:: with SMTP id ly3mr2238773ejb.369.1606389613639; Thu, 26 Nov 2020 03:20:13 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b088:: with SMTP id x8ls774510ejy.6.gmail; Thu, 26 Nov 2020 03:20:12 -0800 (PST) X-Received: by 2002:a17:906:2582:: with SMTP id m2mr2180954ejb.271.1606389612827; Thu, 26 Nov 2020 03:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389612; cv=none; d=google.com; s=arc-20160816; b=P0/Sn1iW1vyygihvmr6baJIom/kmDWdgCUutESedpr6x3NteMpLqC+CQ7PYY99QKqq jeCBA6K1N2EQ6MJbPnKrcnBEm/sTwC4a2lrLCsEHvagPvletuRL6bLHzcSY42J9s5ChC jA2kH69/ktUkGvpEVJei3raVuQBwsIItaz2IsSWUIu4UnaW31+D2c0Siq/VOVUjBQy3Y jGsmDUzelGGQzMknb6bgOwTBF1tZ2m0fR5GjXne+BYN616O/ya6bVbkry+b9bm5pFgOZ RG67hIBk/lopqVkh6M0KI8hls1zb3WoqOsuzdkrbqg6XVw8Nzc9s184yDf6+F39H+K2V HMRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=nnvtzJhMc7REDutJqhVZ622UWfcDQ+xCPG2UXd5Ej6A=; b=fyBONQRZ5/PqpeV96dIE8Cr26FU5sDcs3FklaoTq+pOxqyD6v83lSuRiRudK0Rmw8V vxHKRfXPs7lR4uhnEY19PhqXLBZaPPfqXFmISXHnhCujtDIg/dw3gfn3eIjP/PF37SfI LIk3mbcmKKgxVHMRUHc60rlabzLmFGHMB+6VTlnMSZC6Gk05jZZwGvtJG2IkupUxfB4U pOy9RPPiGIWWd2xIkV2oy4q2Fp3Abs+gqdLXR1nXo9KcoHoILB95Adl0PWzt0KJygCa6 24+M8iKuE29uBdjTwjouC1wCMsgTGwsBSt6DzH7djV6CVF5+fDR8U96/KvMuZ8Gc0PMH rgmg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:12 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: IJLINaDyIhsOyh7FkQBUCltpsUwSPlYC3/jsZH4ZVPUSBP95WLlSqc2cJLQDm8MIum8def1uyp FxOZ+O9do+lkbEMMVZfu4SnUgyFhXp/NDpyFUCOA/tRkREj39fcvID3z7WynVmRIAMoa0L3iJT ARrLkEAHU9JRddJc6CYgjIj6+bDRz5ECccZwcvg6id1Xz+k7Zd9mbd2maGjFOyaddZi7Q6RQW+ 3D73eE0eBa+iEoAyZvxZcXwgZvOIFwxERlOfWB79jAlhzf56EHZN4TU3o8l8xM/i9SJVSRJvZE QLs= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500428" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:11 -0800 IronPort-SDR: LGWfd5LgOpw6lEMezOjvI6ZP7lBwQZfkA3RsxRDGghIes/lJslfQN4DkhehjHH83PYzq11pdGM 45Pw2fTUatJGBSlOTMnTOiqk8OeOIx7QPuF1onDjuSN/4sHGVfOSDSTFqbNJFegn6pnSzkAhSN g4uX/a/U7L5RVcHvOdOD5kZx+NQu7/313cOcXx4vaxP+c/kMrgTg4YLQC0vBGg/bG4981Quug2 51pwZ+YjH9yoEmVKkWaauWld8jz9fsW4JjcOqHvG6w75zevMY8PElNmOjYdOdTtQuxb39FVYru h6s= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 07/14] deb-dl-dir: Fix skipping of removed files Date: Thu, 26 Nov 2020 16:49:05 +0530 Message-ID: <20201126111912.3037-8-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421595840564249?= X-GMAIL-MSGID: =?utf-8?q?1684421595840564249?= Some packages are installed and then removed, like localepurge from image-locales-extension.bbclass. Those information would not be available in dpkg status file. Use dpkg log instead to see if the package has been used on the target. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 64d1823..29bf45b 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -7,10 +7,16 @@ inherit repository is_not_part_of_current_build() { local package="$( dpkg-deb --show --showformat '${Package}' "${1}" )" - local output="$( grep -hs "^Package: ${package}" \ - "${IMAGE_ROOTFS}"/var/lib/dpkg/status \ - "${BUILDCHROOT_HOST_DIR}"/var/lib/dpkg/status \ - "${BUILDCHROOT_TARGET_DIR}"/var/lib/dpkg/status )" + local arch="$( dpkg-deb --show --showformat '${Architecture}' "${1}" )" + local version="$( dpkg-deb --show --showformat '${Version}' "${1}" )" + # Since we are parsing all the debs in DEBDIR, we can to some extend + # try to eliminate some debs that are not part of the current multiconfig + # build using the below method. + local output="$( grep -hs "status installed ${package}:${arch} ${version}" \ + "${IMAGE_ROOTFS}"/var/log/dpkg.log \ + "${BUILDCHROOT_HOST_DIR}"/var/log/dpkg.log \ + "${BUILDCHROOT_TARGET_DIR}"/var/log/dpkg.log | head -1 )" + [ -z "${output}" ] } From patchwork Thu Nov 26 01:19: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: 231 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229657oou; Thu, 26 Nov 2020 03:20:17 -0800 (PST) X-Received: by 2002:a05:6402:31a5:: with SMTP id dj5mr2011901edb.110.1606389617473; Thu, 26 Nov 2020 03:20:17 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389617; cv=pass; d=google.com; s=arc-20160816; b=Qv2D05lSaxDnBgu+dfPfQXgL+zhOeGVD9EMzHvc5rjfTSsxEY3OMKy+M/r6KkqFcVD R5WAzSLe84krvhDE369AIHoXk2xpdKkwAcHxROwxjttvFvMhOvyrZmmHnWw2BzbRt1o2 OAGpcUEJqh13zPmnE5HahmhNwnbR2nEnASxDphxV5xTcRFCGZ6SoOzD1N4kG9oPg7TH7 hdeX5iNXuWHGcAfBY5DPJWgZpmMKp2exVQkw4vwgwE72UK9xJbsoZw4In/G1DQpiqKOa vA+dBzsuBO475a3TjYdmZwz7GtqFBz3ViYS8GcwfpiH4saQiDUjAwUh7KqkqNu03/Egt tNqA== 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=/ysI9R3t+UkLsMdTWCR27738X4o9arBwj8i/57jfS+8=; b=IJ/Bsi+N8I8xKdSl/719klTIsidKiVGBn+bh6mgwrWw4GaDsr805vob6Z9+enW5a5b ilvHUwMn1fVv3w8rd7N2Vf7KadYv0bjQJFPHk+30T+UbWHYnV+wvJNuf9X6Vm2yt/fit gIpJU2avnw/fxe57+H3kU+LYbi1yIqy/CifcOiC/xUg010hZJCN+8f44bk5LIc5uYJz0 Iwrajoi7z1v782OoriHis9iUWxxs4aQjRDOpWh/GcgK2edMcGCQlqWUdgzhUWhavw7Zf 8yyb763Gk0j6DMmIgozPZ6NTzuGf2OmpS0mpZZQbsC0pzdtbmPFErrW7AsDOe4p+wEoi mt1w== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=d+2sQGNO; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4m6736qkgqecek4xwy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB4M6736QKGQECEK4XWY@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 l5sor3357427ejd.35.2020.11.26.03.20.17 (Google Transport Security); Thu, 26 Nov 2020 03:20:17 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4m6736qkgqecek4xwy@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=d+2sQGNO; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb4m6736qkgqecek4xwy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB4M6736QKGQECEK4XWY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389617; cv=pass; d=google.com; s=arc-20160816; b=ownaV8q+9K1Hp8hhCNrGJFOUg0zAzNF1wUU5mq2yaGlBD3oXHtwxvB0zYu9egsvEm9 CKBxHeOnqiBqSFF3jpKdQDFDivQXBIa12iwNG2+EUIbpBU27mgncO6IneVIGPd/hyU5X Ub5l/yKeLebHezsa0QitOEGYjNsJhyV1bG0nRUEm/DkCEOmI1oQQYf+10MY/2uzo955y 7fypjrribD8uETe4HLGsA8MspOW/BVXGBHms7woQ8IsLKPGunwPuYNcvZX6OQaUI3nVC EGqltiDFZCN4naybK5XVKBVF3uSVoy+FccJcv7TS2TSU5HHimKq8K05MOaEFR5a3PixW CywA== 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=/ysI9R3t+UkLsMdTWCR27738X4o9arBwj8i/57jfS+8=; b=sE+ihnzxiXWRe9YD3frcETAI0Oj8N7AybkDC0Xts+8Ab+Qbur1bMUB7mjAk9RL9AXJ pMNdWLf1UOpcYxx0aV6McNjtXUU1Sffikcec7ACroGnjH2ftvjog1Hi1owW12qx+hAZm yOtB1tRm7VQv7wynxkkk4WZPF/Y+d52wAtRdyqe7cLJNOEonjS2zeJhk593PTcqG7ZBt HmRzCEHt2Acgm+qHQ8jPjpbcBgJau17cSazMsA6j3iQu9Ff3jT8/4RGy06BjqVeH75fc tTkAL59KkG9cEh0d5mvsKB6tX2Wr8UU7DKcQ80A2YJUi/y9QmHX1WrPoLsSWyAhUcZ5b DbNA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=/ysI9R3t+UkLsMdTWCR27738X4o9arBwj8i/57jfS+8=; b=d+2sQGNObwqBJYDww+SI/K1QjkydZpV6WR9BwFAE8R1a7q1xkPv7Vjj+3QqEmAufCQ +PrKShMVoSbz5d/XoSiyGUs4eh9ui6hMbsIwp1ZO6pkktKrJfvKH8zpRLkaG9gKuxrm5 nvykHDIbppfvRM+eDxl2PNj8fOV6o8kMN8KL2BWTOn0wjICG0LrbUZS45FDym8efG5mu JeroOEbvoJL5JQOo9tyqIDxygJHt6vEhT5hT0uALUbC78+edjiYPLQ42tlyIGMpRGyQe nuzMcC9/ndO3lWL0NFRdRYOzSM5SnfpOmmjDTFVAnbXTfRxKCs4QuZAkInOR8bFkzM6x C2PA== 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=/ysI9R3t+UkLsMdTWCR27738X4o9arBwj8i/57jfS+8=; b=AzKcjGTRm0MeErswO9SXCBAWD8MKTTEShFb2k2iROn4PONit0xJ7gS+BDkdQnRLlYV y+kMavSw0QtX4JWnCAmc9i1yHPWrP4IE1nvtJQtDhz8Qvb4iBBm3PtthwsD/5Hu4yFlS SKkVPGCsJFqvy7HUE6eoPzBdZefzMtlkldf8znhX6byziKRWS4kkNHiAhMIpUBjzo4od OOtKVBLsxqzP01iw2/jnLDV6KVo9OxX6/xDmcu8dJacCNhzqGq2hQUJ/H+QjKPlTnp0c wGjotOKFDR1aT/Xn8lssarkVTXkUo5T54ueUg2hmm2dIuMvQNPFLYkUh3PMc+ouC55nK 87zg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530jk675kpBNGZNQ5JjrZgiLx8tVoKXMV7kz2V9FOJ8S+rGUJyPj oXCPbHeVVVP+G9nKpuK9OEs= X-Google-Smtp-Source: ABdhPJwRnc/ByRPLo0qRq7zbSYvkZs3QcZ18KlloqlJG6pTD+BgW/ODi9l1gz3p2+IZxrn3H7a1/5A== X-Received: by 2002:a17:906:145b:: with SMTP id q27mr2230511ejc.86.1606389617158; Thu, 26 Nov 2020 03:20:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:d151:: with SMTP id r17ls1871792edo.1.gmail; Thu, 26 Nov 2020 03:20:16 -0800 (PST) X-Received: by 2002:a50:d617:: with SMTP id x23mr1999080edi.361.1606389616314; Thu, 26 Nov 2020 03:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389616; cv=none; d=google.com; s=arc-20160816; b=TAldxx77OTAfEGMR4MaZU4tDj9bM8QHydlRiVVhbKNx1Kjr4foj6IDOn5aDA4V7GFJ UZv73D8XqDFZXAWuu8+MZg+mY04PvIvd4twByH85l92AKFMjDvpskP6Bes6w556hx2jw vBZedgaWvuQviMtbdg5dq1yehQAWK6ueS94VVg8Yaqe2gYK/oEYYroVUImQFuIgyX6WY rgqwzsvkTa7r5UV3w2mE4oracEFpYsdYK80ZRl6mmmxaJd1oDPZgUl++mZFQQdBk9sg5 LTogdZyo3Eo9IAF75ZXAsjTaWQtOuMYkR6G1XSLxwPWn6IxKxFFbuRkgvV6XCkUIdnk9 Rodg== 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=GnWFdeOrVWMPRHdHCNv5gZp4STHWi/kjUDkKVCKID9qdYVe/PohwNlxGj1rTFkhoKC 7KIWLpoAFcMMWd6DmBSJXfqhm/qN9RcMxuxZOBZ+zH8hl3NFDb/98xTU9N7yxX5YdC/T UH654wquTvrNmoKGQtw6k4C/+5aHn2rtu6Pu1FmX6CMZP3crAd49GdeeJBh2NNdGkFmX S3xK1zvc3SdkbDPTVtshy+/Z5m7VbwJnVeR7xIhcMzrYHlh3DtF0iMWTORnt72klLrQj zlaIqZm0zyxtp5dkn/2F/z03sc9DxnB6TFemTWMnBIFqfqK2XMpItO0CZ+KDVCTkjHNn e/Zw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id v7si292239edj.5.2020.11.26.03.20.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:16 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: MYHFNcFYc7x5mGA/K5/P9lIZSXeH/ZPPwj78UPjk3yQth2/U7V7iAVZazqXAVZf4NuJlxDlVCs gA+V5ChIcsFevGHJakhC4/Wh4fDIAW1fOPpGuy53f268GyUT1TDXeHvjSkkYJYWU+Sk9VIK4EW C1trQaS6802mEvzfEzzO13qWat2U9x8JFIygKesQdVpkCBFJMaEB114kDRrbJXIJJuXvpu9Hgl gDjnzPnufXwpJtA1sxjuQvXgQs4KiAwJ3dhqHDRzA+77FhI6swA0PweBKjWWjkfe7sHr0P5ILf W2Y= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500430" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:15 -0800 IronPort-SDR: yCKYqLLZ56lnoUGVhas+HrpVPpBBClCnPFhUBaAYjVmF8GsQepvIhnwK8rusY04whDPa+nJkbo 2Onzvt/X3dba6w34b6M2fAynv1EXpOvKXf4lCFOzwy7JkUpvXf5FPocLfSMhsFw+Y7xbAexJLA ngw0H2PL3GRRFc8/1Gw3InXUquQdlzRuqZrb7xG5qMIAHFGDnQNtJIttLPg2fqS4MW3hydI1Wu NHa9KrV71XV+KLVwwJJpkyk7xWbFDtm/CGNV2sgGoIcTuj6c2Du/6TWCPpGBuEs1MDchaqda8a EJk= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 08/14] repository: Add a sanity test to check missing sources Date: Thu, 26 Nov 2020 16:49:06 +0530 Message-ID: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421599357965587?= X-GMAIL-MSGID: =?utf-8?q?1684421599357965587?= 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 01:21:03 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: 232 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230505oou; Thu, 26 Nov 2020 03:21:32 -0800 (PST) X-Received: by 2002:ac8:4e05:: with SMTP id c5mr2408488qtw.291.1606389691869; Thu, 26 Nov 2020 03:21:31 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389691; cv=pass; d=google.com; s=arc-20160816; b=HVqk4U//K1OiVvmpFn0Ij2iLxCkUotc957J5RRvexyFHaVX2g/OaRKGftU2gpyXBN6 4F5l5BnvHEuQK3aj9VWE5k2XiNt4WbXbPkS94ZYwrVUFm643m3HbTXS2Zbw37PEqQ5Kt J6CyhkCMCOgoDjGWJrfY2+PSaBJD9x7uM2skAvOX491snq5D3nd4XmpsyQVfHYsxqtdk g23e0d079Gad3XyrNWZTpAZx6S33EHxDvLGdLwnA0q6HPOb6MldbTaDXLGdyo2Qoq1mV 0zQs9mrSvIReSiTVDv+/vIcomRmZjPOR+b7bjPcHLjbHY0RtFtfC56LQxcLRzKJwJb5F fPuQ== 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=lry9XXRbVYgVSLvtlg5OsePFi3piwL7QqlDbABxEF1Q=; b=UAru79kc4XVP1AWscMnWD/8fGbeaFzdnZMRyzmLOiDQr5HhFtr8hWMZWzVln6Q+Pko ZcCpytdjSxx5K2an/m3Zt+K7WxVF9NTOmUu6PXvz0t2l2TASyoX4LUOpEzpgG1+eBOtQ udATFQhVBb6iC8f+qcxo635WN3i2NDF0SFTJo/cEzuHu0jx5lYdqHS54HrHJRPoTLxB1 GfCFUQL3BvdLjgy6+QpnnCRix7cyCZblIino4kdWLwgw9eMXIPWgEbDhVTJgkCeaJEEM jUXFqXVp8DJTEgSCMbEoaoOO1IkTsDhVos0kW3ST1ixVdxDxXXXa52N0CNPYg3r5ZyIf jnTA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=seQJqOYs; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo47736qkgqeipicnka@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO47736QKGQEIPICNKA@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 h27sor1023533qkk.32.2020.11.26.03.21.31 (Google Transport Security); Thu, 26 Nov 2020 03:21:31 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo47736qkgqeipicnka@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=seQJqOYs; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo47736qkgqeipicnka@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO47736QKGQEIPICNKA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389691; cv=pass; d=google.com; s=arc-20160816; b=bMo0a3XLBZuSMdfM9+WvM6MbUJiwSUN/3unrXJJ0NiTw8MmbzYkzDEAfYghHQJlTuj 5g8JYiKtTwEPP9GhOs8qnwhopNc7Gy7Slv7V2NxDOwFYuwoDfXjVfvgzDfjMvKueKlCJ gOHyQhfHnhMK7eHGQhV7PuXPIRZalx48qn9HSSYV0PqSL+Y3JLIw7AmYoTbkQCc5yPTl TVoWqxq5RskjnSUa7WIiTTy9S0b9Q9MqErQpJH9ZEebHAFuGZpwTam9B9mAkvMb3k7zn XRx87VEH2gCcI2MkqmiCgCzDRxCX+fSYuUlN/H5UNScKtD0XHt06oZclXE/UqtnFAIFr wZ6g== 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=lry9XXRbVYgVSLvtlg5OsePFi3piwL7QqlDbABxEF1Q=; b=Vqs+6bTWJ3Dj1WIeFpeKun8hFvV2hlmMU1EsI64gUNFJmrmx+cD9XryMYKzdoEkzeo poqAdweKU6i5xq2a5caHQyJVVHPzWdcbc5Qxhf0zRKHStQAEp7sL4GFxjbIgHoWrFSWP Tqs8frbwaOVGyR5Gdk77uYVbqIFGYf46COGbYPKXXF+E7S0u9O2LEk+trIMmTt0sXniG DHDQ4+Swm2ed8ecs1ZshKnfuGejEaQte1mz/hGpaGvnxjWj9d57aNkw0GdVE2Y34P4UV 7IzKsSfKf9dWjdgWa3/r8uWcPA1pbXwMwC2f3NtN9OWmL0BgX4gmMEIXWE8Tnop2TpuJ Lnwg== 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=lry9XXRbVYgVSLvtlg5OsePFi3piwL7QqlDbABxEF1Q=; b=seQJqOYsX5IvS++o3bUgmejVPkbxGXHd2fzC61pmkGZIU1JS7yn9X7fejzMb0SUZ/7 qEoCOMAztIxe+3RP4j5jD3PBniGhoQx+pSj+LPXxe3lw7rXsDVtS/5ZvRkN+X2XR9fCr WwtIeuSo7sM11YWv/nUnfO4b994ZJ7NtMEj58jBe/ttucZ76duOyOtFb5ekMsYMHOL2P bXUWIJHOk6nSv6NHdTSWF1rU2vSCSLoAqrGdwqwXwzujHZ+EbZVsMGo2EVwzAi87sh5b f9tW/MYRRaOE0nx7AWw0V/l9H7VW+89svLgA8j0NtRwL6fs8AtP8o68iCLtklS7My6ul paNQ== 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=lry9XXRbVYgVSLvtlg5OsePFi3piwL7QqlDbABxEF1Q=; b=D6EomKkAA9Iy6P0EQnLX1JECJjWM5jWMY+pHapnOG2lucNzxlNzc5GAJ8I0EtmHuv0 EbEdpPuwzA1SCVA/pu31kuJJ55AeqryFQGPdfVykyS3RgnDwi2N9dZs5ZpYlScUgqO5d td1zChZGX0SXeChbfzJt3oy0rYRb0LaTRzDW5xHBSzFWoqviNettxJffRle+OPAGdd5X LUCLxCzoI7JE6/e8qczJ6QDefC6TYA7UvibMMODca8VYZ///p4z3J7rWTfhYqHFathRc OEGjhM/z4CyILbGb0mLMxZ7WgKrqB3jnT0ttvriZ6Fd7pRMJpMvbaWJTr+JLtXBcMndq T9nQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5309eoB2kLRKuIRUcP2np+Vh2c+oDNZO/F0kWh+2PqHRc4k8sTIj dnOHAZ6wgo/bKDATZ3/XZfw= X-Google-Smtp-Source: ABdhPJxFMR2ZUHkcVNHo8SP+ogkhhpZQVsbp9Ir34/WtfWumk4nDZLppmcB5Y/zMsFRmE/+3//yqDQ== X-Received: by 2002:a37:c4d:: with SMTP id 74mr2723793qkm.161.1606389691526; Thu, 26 Nov 2020 03:21:31 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:2795:: with SMTP id n143ls902314qkn.9.gmail; Thu, 26 Nov 2020 03:21:31 -0800 (PST) X-Received: by 2002:a37:9fd5:: with SMTP id i204mr2668760qke.470.1606389691030; Thu, 26 Nov 2020 03:21:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389691; cv=none; d=google.com; s=arc-20160816; b=T2Z9WPqFOIY0tCEwiq072FKaZ0VIcLkatWc/nTjTZVab+8buiJG2tRxhtG8AfuEERh cMdEDkAMBkqg815kzIWfpk1Mt5wuZUSq+nhPFK3gmM6wpsY6qgGW8JaFJRwv0gUcciKO 1Lk0SYHi/H07tQGP3FDqnKdWqYJY8+YJOKSH+0Kl6v7J0SKvVqK3SM7jwgsht5FnsoqS P2VA4XTdMF5DIJi3bfUwNKpjQT8CkUUjzmRXbozKgVyhEW+G9lJE8w/aNyqVsXn/BGjy Jt0F0BaFRCznYdfmRnCYC6qo/VX337pd+XmpWMX/n0l8EQMBEDQRdlFC7O1uy8JQloSe lSaw== 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=z73qOCTAPJqU9AmRbG9ZTjax80TGEwCyximVCN7ugFg=; b=x+mAiVXWV+3ZU9vn4jDRPq4ADjau6khOuzi6b91A6Pn9FfwjOng1Ix+aDp5shIg0Jn qemMl0E32baL+1S8S4PYpPu7ZxgeW8xuV2tqc4niHJi4A33OJlG0upurXPIQxpd0ZDfg hZZcwfMIhcHmwfc0koN0tsBmA3ZX9yURLwwwdiiNdPvYtOCsUka+TwYtdT0r73vpw76h n4E+K/thwGQfLzGrmLQBgWynRYAbbvAALOcN9TnW5yG5kTqfPVFwNvsalotjAoehmOw+ UfaRgNEH4COsAa/dt0DReXOEeokM//VisSgrN7TjjTlSz5s7U197DjK1TmRi+zuf0tQF qt9A== 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 f21si113872qtx.5.2020.11.26.03.21.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:30 -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: EiBfQJRtGOe+3jm07Rz5ZGl48LTGJLjGv8dXh7rdDBm0fZTIjCgjp6QY/YrEqFhyQCzhs4J0RV QlCHj2TvunRvBWs/cjLSxD0Y6Myyf67KCWTNZ2dDIKHWAVEH8E0AwBLyMlxeEynODAPgb9Mj0i sVVGfr6jGxdxgjHCG6o6C8NWwYNs8QAr7YG94x346L8n8otP5K2nCXaeGxUDy7ms+KyFpEWzfA tUq5s2soJeuslW/fTE35ot334xeGtJnUZlcMT0YzyxqFO4NdFDP8jy1wx5h70g5Tx2ZAdpOCSW LRs= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523583" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:29 -0800 IronPort-SDR: 6IO97ParmIvuz8SzzPupCtB9co+dAIIJYdQIVoK9HGrnP+kxExTVFef/2zmv21dVju2gQ/4PAk w/f/M14lyGNZAwoc0XYZe6/ADYT228xwCLCo0xUavAOfl1tYzUcCQNxQpN2PLKYUxGdXANHiRb Cy5ZxE8ZUyYPOu7iG42LRe8E4f6Z9nN8r9+alOAJc2FRzfdlYaOdFx3rh2H8LEwYQ9fX7MUd0b jx4ck67w2Xgx29V5cBdrTKQ0QWIfFdXiCUyyS3xAIdNWS/NEtAjcM4CGYGztSC3oADUT/j5TEt 28w= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 09/14] base-apt: Introduce BASE_REPO_FEATURES Date: Thu, 26 Nov 2020 16:51:03 +0530 Message-ID: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.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?1684421677354414008?= X-GMAIL-MSGID: =?utf-8?q?1684421677354414008?= 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 ddd8cda..a191a8b 100644 --- a/meta-isar/conf/local.conf.sample +++ b/meta-isar/conf/local.conf.sample @@ -180,6 +180,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 51cb2e1..5c2c88c 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -63,10 +63,12 @@ image_do_mounts() { } ROOTFSDIR = "${IMAGE_ROOTFS}" -ROOTFS_FEATURES += "clean-package-cache generate-manifest cache-deb-src" +ROOTFS_FEATURES += "clean-package-cache generate-manifest" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_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 f972a89..9142f12 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -184,7 +184,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 01:21:04 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: 233 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230542oou; Thu, 26 Nov 2020 03:21:34 -0800 (PST) X-Received: by 2002:aed:3c42:: with SMTP id u2mr2484333qte.159.1606389694769; Thu, 26 Nov 2020 03:21:34 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389694; cv=pass; d=google.com; s=arc-20160816; b=j1rpN2KHPUciHsUp3D3Se3lTpQz63TJsoG1BfLNq64qwR6mWBqeOLA1TfzC+vFtJf2 jYLfCBFvKNM8764MAiV2Y2vN/rZOrsSY1t6T55wJQWF3zwQ7g6NUWXjWzCh2hTjIYMww nw36vQjE20UgzioRwYhc45wrmarIkWtLmSu3pN1BxGr4pdYd0hU/0l0e2cGgWb2oZZEU zyGIt8Q3Y3aD0yGYorqBL7Txu7WcYTS99UxnvMIaYPpI28+mkDUkvhHLoJDRVJtCQQ3S /F8F/DAiCnUVc7lzaH0aMPcS3fveBoVIiK1BAWJieK/4TqxX73ZD6yoVXmtMnqn7TubF y6kA== 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=yNUcAQg+x9vTeRK2CTy7T1gRVaCyRtXRoCiuvOAOj70=; b=evSKeiyxuBMpA2qJyrlPxbMO2SlHVnB440OI1AqBchYOG4gMBijkWwczWi/rv+jOcy 70vQ7gViAqUCNU1zn4GNtqAYuv5PRJFWEkzCgxXReCLfoeCGPvyQUqVQnmiWlQ6XWLpS rUoFAkyBvtiK3/foJEma3rKZfp08kazaHL5a6HMA8TOQ27Xkw3xluSYNmyoVedfhGBC0 vdlwFionPOCJchua7naNNnBQuQ13PHrIpvjd2yu0oskd57bIUrvMw20yjvHUivP+ZDvv a7Jv0+ayUi3f3PGlLmZNpGAbHvluudF648WK4DGK6tfhyhq6UGYLftPTNhxxrzTCRvAP q6zg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ehdk3T6M; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpu7736qkgqehfmpazi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBPU7736QKGQEHFMPAZI@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 d9sor1017813qke.107.2020.11.26.03.21.34 (Google Transport Security); Thu, 26 Nov 2020 03:21:34 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpu7736qkgqehfmpazi@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=ehdk3T6M; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbpu7736qkgqehfmpazi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBPU7736QKGQEHFMPAZI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389694; cv=pass; d=google.com; s=arc-20160816; b=SSLbAiqcG4LHnunocNGMub1dmFE/U75lMMO6V0b699QdHBwfO6B+DkWgfh1dd50qkF 7ge9z6tDcAZlrNmKUXUW9Wj5e9va6BHsEvoSN8V2UbGwP/Rz9w90qeiLZHofoNzyAP7G ATy8f3iPY75q4bSsTaUJnmBBUaaSRykw5B5sdBoUw0Np67qciMmrkIXBfeTU27Qep2yp qqwo9f8J21Q6HsgOY8Japj5eUTHxP4xLDu1Dkjvjb8s1GWQG/lT+W2EcGIaA+9RaDC0u wgTirmELeG93c/RHBZiq7stq4UVft+GDL6GLV8gRz3RZ5laFoD7LHLfA5NbJRIYHukIO m2SA== 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=yNUcAQg+x9vTeRK2CTy7T1gRVaCyRtXRoCiuvOAOj70=; b=kt+7XBZkkVrEWoxGVTM9bCiaVwyli6y76Ta/wl/7kqarhV/wcwLNLlm9Q8CMAbZdC/ iC1N1u3fm8vMDoCeM1DU8Eiuh7H0x3gJ7ub46VQ2wqPCXGldMyrDMMZyJRxmAO5FsKRS 5ctmQFLWYiU9RvV7bdicxfWPRp5Z6FJy+HumvNHSrIV38sGdcs6CPvZIAleQhVSfTa4T 3HAbLNlpeNXKTFL8wJKfIrtg3lqdAnwbarBPtnuBoge2u+KmYT9tNu4HZ/5SArYN9NfQ hxB/kkWNTTAYcvnv6I9MaYvx2p6QaW98dHJACirLl7Ht0HvDtxhEou6CTRN7HJarKMl4 qOxw== 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=yNUcAQg+x9vTeRK2CTy7T1gRVaCyRtXRoCiuvOAOj70=; b=ehdk3T6M6is1vKxjyyjv/gSc3FBz2f8eubglvBORLr64CAUh7hRtYVVOH9p/APVqLI ZIzlxLmjvPIj4Rb12UexoWWlLBr0H4h6hubRIfxy3T1BPLV1qpGGbk+PNcdaRq8WVXtg zPIGG0pXYfV6RpHachXkTiwQs89V8XUlk0qqmc8Z1h179KwrrFmg9SCUbvoDVPq+L78g Ygr6VCjSeDZ5ceJ8K0MYfjtIGH6MYNlN3CZYVJUKxyTNWaYiAIZsPBhHPhxL5U4L9V5d Z+ozXg0utH3livHGepvP4m1O+ersEL5bQp5HMxVe/R71H8rWuPZ4Bkb0ALkrJrAAfhdE Zh8g== 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=yNUcAQg+x9vTeRK2CTy7T1gRVaCyRtXRoCiuvOAOj70=; b=H1HpQNIOFBOF5jmwgK0wE8OUzQv8PTCABoXd2nAYRZAjCk7ZoKWSFMp1c/cxNLvRER nV0ND12FHD0DvWZGO4A64WVyA3i+4SaSaWE6tyyV7gkkuqBH0OwhPjjATScgLlT0wQfb Zr0iA2LcjHV+8jkRCfE5Hi14KZBV5+j8A5kRLpoSSFFzxWTMNdZx5FznCM0HjLPgx5H2 eB5VPIbSUp6nTLZQpeyMU+SnXv4jUMRe7o5UyFQHj4gP+2pC+ylmQ/5sAItlJwgRCWWX tWqXU8UjlL7VAN0CAfjovzAkaVSN3UHikIqrt2I7xJEA1icX+oQ7BL3GSRpURwBWBebO SpHw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532QEHQg30Yaig9V11vigpEfidriPdTW2bGV7aBFy0t1SLp3XAHI Mv36NI9oJFasug13N5MyOLY= X-Google-Smtp-Source: ABdhPJyHCHA1P5LA88JzShketMjNNb/ThqAUg0zpPwRLiiuLO6L9tREdx/k59y1c0K9k3bBfd9H8Xw== X-Received: by 2002:a05:620a:40d6:: with SMTP id g22mr859254qko.232.1606389694489; Thu, 26 Nov 2020 03:21:34 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:7904:: with SMTP id u4ls909008qkc.7.gmail; Thu, 26 Nov 2020 03:21:34 -0800 (PST) X-Received: by 2002:a37:6384:: with SMTP id x126mr2611031qkb.458.1606389694156; Thu, 26 Nov 2020 03:21:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389694; cv=none; d=google.com; s=arc-20160816; b=02yEVIKHjAWpM/wnu11Iav+gG2eU9xvEas3afe5Fn1UW7i1pMYZ/bg6g8p6P0upQHm o8It7Rr08PTBAIPVksYk8PaLKtXKQimD44aaxDbAjJBM41uTP06dOA/hBLmpbbtidPVN Kbs5NNSD1J4OzwPo0+57sjJ09TuLJVOmxY4/dI47+yqTki/ByDhmTzh944BqB3yYixa1 rZ4fJJi1ewySf/qZRYjBwyobS/cpZ3zBA6LnFWWeOicY00fX6zq0gHG2zGTzLMskInws cV9kG5f45YI69fhnmDjiQXd+7FMDFfNJPgdYMaPZo+VQGM4x+CQcrIW2lk3ytc9QerHf pTOQ== 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=05+vchK3C7KOUZYxUbyAWv47Il86Df3lq0/i5jLZSrbeGULZaAdrbLngdKAkmYoIKp TpRHBPD1obu5FEAlpG+td3GHyG/M0PjtPAocHXLAWCFS1oaxGenHSvWuDDVBfpurpbKl AlkApDakYeATviBeYwV+8djQSQK53W7MeXE5Ij1By/LcFFK/FSBLNpZKZwKHbldpYNiH 6Bu6jGyccWoXOmLUUHDIVt/mwMC8YgSM2hO7PAfYXN4AP6CH/9WqLvulCO1Lo9FWMNDx LXHQHR2ndqpggxGQtkQoK5mCuSen12Yjx5U99ETnic0kpEM4j+CU/duLj5PG1ZOVgPz3 M2PQ== 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 f21si113872qtx.5.2020.11.26.03.21.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:34 -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: 3i3Fz+VFbzxBK8Y1ZB7pOubomtxabqJFzVd3CwZ39HRCmc+Uekdlsk8XQhjfXNCyqLbjaqet99 tRoDzlJiCXa+Gw0HdO8w+iQt6S5U1zIZboQG+AFxRJbsQSQ97d0QjLMr/4GFqlt85f61E9Riph 07AHJHJrtpyvpJIwKaHTcuiYyx5TCnMd1B2fMy60intnuW5arFWx1u+3yiM+1/7JJtBEePGZwb 6b1bHje42JAVeLq57WJEPBg5hFa+hDWgZWi94dpI5YDjl3dJTR1XOcZ+Fdfj40/zmpNMeXJcu2 /a4= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523586" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:33 -0800 IronPort-SDR: IUgVgZC/HK65E57Qt66oFxv17gkY5MtCyaAPBdEoKpFLenK6T/etIDFbefo/M0Ehw6CVXEmu64 9Ch0VLQcA1539iRM9CfaorZ+5X4xzjrslgiXIH4WZRznT0O7Ob2JbOL4Z8ZDjKSpntdSf1x6q1 gO8NKjIjFtVLqiDoA40B487e2m9IGajDmKTVDEHlmRJIUYzor28D2wqwRc9XzUZz/pvSSp8E/4 +oLQ2b5y+poC7dx7RIlD2IWAtXg6DKvUphxvG4Mw7XuxaX3UbueKhmQ4dJFef/G8Mx9VLMK4bM zCA= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 10/14] repository: Fix failures due to missing section Date: Thu, 26 Nov 2020 16:51:04 +0530 Message-ID: <20201126112108.3320-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.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?1684421680604108413?= X-GMAIL-MSGID: =?utf-8?q?1684421680604108413?= 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 01:21: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: 234 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230601oou; Thu, 26 Nov 2020 03:21:39 -0800 (PST) X-Received: by 2002:a37:9a94:: with SMTP id c142mr2602756qke.480.1606389698930; Thu, 26 Nov 2020 03:21:38 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389698; cv=pass; d=google.com; s=arc-20160816; b=nIThyebdNVvQeHeYG7LmfX4APg1yX3oBVjeiPDoaco0UTvkJtrT0/Pw2dBZU2lBAk2 VEFMr0pwjl15YNUGuYrnHukmtZw67H/1Wa47p2TGd/KEBBgBQxSHZ2GdVMfD8InbdoUs 8DIMsMAVXrOzzv5mZOhxhu9CX/AMhhaMWnvQnj99FMjuhazFdL4Onm+qTg5SSiXGKD/x YUrpd/dKymziHRyYzELrfgDU/hGyfDVy9rhs4+tV5rxkGrDokbkQYp+XLTtjwT9StTGH DGRDqimJKyVEo6sGXJmRwTTrmO8781xMdGSDf8t+exwC5sWu7wji+NXJoEnsCqCmO95A 1Xng== 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=8ETILRL+BoYc2KNKiD3VIJDFM/+ktGIFfIy07ODf2qU=; b=hdc8F1LrgPyA0vsN0ZVn6Yaumt3oMVxm081nBBG/ulEAyVg56k4zRM/KzSZaCq8yhs nNFc9UF5lQKMF9tcy0DSKQrKRPMStyjwAvbcHQ13qPbOaoU1THir7T2Lf2+XEhwr/G/a wIaATmg6ANoiEcxtYUdECMmMBI/F9yO36akyb4Eyl+nLo5olrqsIITfolJeDJ02FIe9x Jvi8AJmqT35g69Lti3dh0k/XrrR/+HCgOua1wyAefW/jTkvLOY5YGWKU6avPugo24TSD HG2y6iM3aR04KS4JLyGzL8nC2nskE0kJ9iZhP97+4m2Ulw1lM406NpdxcQIRwhuRPpeL 3i6w== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=S2oyS+h8; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqu7736qkgqegoscj2q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBQU7736QKGQEGOSCJ2Q@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 q40sor2104011qte.61.2020.11.26.03.21.38 (Google Transport Security); Thu, 26 Nov 2020 03:21:38 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqu7736qkgqegoscj2q@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=S2oyS+h8; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbqu7736qkgqegoscj2q@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBQU7736QKGQEGOSCJ2Q@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389698; cv=pass; d=google.com; s=arc-20160816; b=zK2u/as7AiVDNQR1GjYWIc4bnZlegdgw0kZlIo3vqiUhkjvqOKfSdSmQAreRgN/u2D H6dtp8ElqDzmPZdjIgXUDpIDYfwakhmx2EnQIPnXlm9aYDvJFP/g0QX7QNKDQvZ4sfI+ uMcH7mvkNaePvVeAHcGOYy7r8BKe74AVSyiRWpNZXRvQnODQQIz/WCqWL6VN1PogNPKF o9Nbe6U71tywuAILKfIqIK9ZciqFYkSmBHpQvspBNm44Eld9lekgV/YkNNBU3xizgpYQ edzs7PZYBUKoD+DljP73XkTpLl1ph/kU4lp004hjp39ozchHFAmoNuSrUEqNxJZQP14w 5whA== 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=8ETILRL+BoYc2KNKiD3VIJDFM/+ktGIFfIy07ODf2qU=; b=Tq50v5xvBItTV4czjbEglyjhw6T/0vGYMd41fA0T1zwJj/EoMPBOd5xkwQlCzI7gUz YzIOoRdfP1A/p1sL0nz9ZkUfOsgY+HVuut8FmnR5j/JeqWzasa6xvWL44K9NUwcLB8pL zBRTRMRM1XG8FqDjEqpTGK+qziENF0bMeaKU8YDQwbbKVObww4cscM4VDPKumCSSKZDd 0vfAL6u9RzjCU3NMDhg44LWL8ejQFfcV3sDwEu8K3SZZbAsGI6rWAUJJFdW7lb+O5NFz WR/NiuSXRCLcpXBLHcm+AoCenyqzmKyHquy2hrrLkC0LDM3ZsOLXEsHUm7wmUm0RP6+c WfbQ== 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=8ETILRL+BoYc2KNKiD3VIJDFM/+ktGIFfIy07ODf2qU=; b=S2oyS+h8VbEbq+haJM9RP92mLn8W1KFUpc6kFX8zz+Z/NhDaVOCoMGjVg7oMk5Fp7s bvW0MJ7UdEbF+XE/Wnqni52jvyrYqr33kXE6vsoM7L+fiQ/5+UUSeKk8UtOsCMN3+Xfl N84rYlrDp2J05e0U4x5cH445BOHt37/3NtMnOD2IRP2Z8tfEde8TKROPcshOjK6Q1Jlc SNimCi5NMaG+5lmHSO7vQSOSBPjxvI1EmhZJTMMUr51266kgmEZw5OZ0JE6OEkUjGGbh 0CTNxF4NAwycqSPzwDPrq2VSh3sX7MGs5PPV0JPtlIA/hY9m3zgd9qR06lYkaIIyd1ou PagQ== 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=8ETILRL+BoYc2KNKiD3VIJDFM/+ktGIFfIy07ODf2qU=; b=U6fDFl56y9vEYQEfkn1upoufprptRGXmPFd+jQsPLzGEoq0EL8MbeYXphIDnD5lnRk J3VRNrUo74TfUNSpw+Z0uur9XNU6M3mw6bJaVlYCNTdSFKX0bvNviZDrDH3dg+gaE0xz w58K83l3NliLjGUURdSKQ6/w9tisc1E+VWDhZN853PGI1Ou66GOxzTOrw75iz/Fk24aY VS7N6ureIbYdc0fxRVO3RBl0bU977WuSiYKjc07jcJo7Q5tKMAX5O3rNV+VFjBMNiMib +U2Fdzo/q+LlwNVT/rPuKAqpOh8AJb9KdmdVXV9hPvZ/R2+RV7tA4GdObI7heSF6PvQG N/iw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5319+BbYTjbhs5s2PaTdL0uGFeSig43MC9SlGFwdEzkcv9aRUmoe mKZKRIkzBPmZ3h2RGp4zeLs= X-Google-Smtp-Source: ABdhPJxTFFr5Egi2hSXb0OyX6wbJn+U/Q4XEXsxdSKHDIkGriA04TxwFoyuCtHsUCIkvzSiI7gPqIQ== X-Received: by 2002:ac8:6992:: with SMTP id o18mr2558507qtq.174.1606389698508; Thu, 26 Nov 2020 03:21:38 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0c:e1c4:: with SMTP id v4ls358336qvl.10.gmail; Thu, 26 Nov 2020 03:21:38 -0800 (PST) X-Received: by 2002:a0c:ec8c:: with SMTP id u12mr2540344qvo.53.1606389698139; Thu, 26 Nov 2020 03:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389698; cv=none; d=google.com; s=arc-20160816; b=UfeiSZ+sZ7Dx4zFHvJru/VWaz2mRnSTJoQrbjxKekihL7X2QKdK7Du+UJ0JYWt/4Ko WbwaiGWlMjFZfSR0U/Uf+YKzSxbtpf2Qo3pFB0DeA+RVQMIVC66DUWpjrN68F51TgBSy 2ZdWm5sxcPzCSnyF5aBAJS+w6hnl/Z/RtxmR5ez6DJwyK8cQdm+E6mgBGl4wrAyy9OnN wHpQVXfD8oKUd338wLJua3V1JgsCMvD8knggpZFokvvnNbnt5dFNy9eBaYw5fDx8Eo/p Kexw4TvYZqQDxZFgzHV+wv6jXmLhWFMbH8RwzYWcWO489Qolxctlleo9lQZ/RBmEq1sJ KgxA== 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=5A9KLTaKC4PNr7CPZPHm5XPtQBlM5mEc4xCEE8YnCx0=; b=gpy8GiZ70IVeNFHVPKQXALRNwcLg9wZ23/lbnsTQRqPX/zham+06w1/ProS4/Z4PQC JJoOVKro+x0ELk+LUw99Tt1X+HueDeECi5iQmDljG/XcV9cm7eB2K7EAPcm0hUT9q/qQ UqBBno0EEcRfzitJ+ePLbfE2AwkgvhxNuS+S1YJ60346pv0YYopSJhwtvz/E7TB3H7cv upG5XX5XNx5eBlzzhYSGhvXS97SggiDnsyZiQR7xc+8R80HIBPkrnK2/A0mZ1p5O9soR soVy5FyRQZKU8zQUM3PKv8VhIcSAANnERu/01LELv/xJvJ/IixU0ugTVMlKP3WFK3qsh F4Kg== 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 f21si113872qtx.5.2020.11.26.03.21.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:38 -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: o9ug5S3ROoXIVRuhrdx93a1LveSTsDVZyVpT63qi4qI9B+ERSu/PxKZpZLRGDgSo08XdUpQGp7 r0KEUHbaGeg8hyAWViXXe88Uq+X4VuuzWhZlUpZq8WWFngmxZU+rpgvIXXKOziKBdBLBb9uIBp HMbPiggibyI6Qyhwv1IIQHhfzQ4DZqFRMsBP/KOkWN/AwlrpNEFvRgPPaz35+7pv9et33yJmhc /kWHtxd4QvO2/WN20k4meoU7BISq6/r5PRyQZmYfArkY0KrCztv7/gPd8mwk+xm2i7eYj+hGfz NTM= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523588" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:37 -0800 IronPort-SDR: lwHXPNF7prAdAYBT7FnDCe9qgdcHMXvRPUL2kX9FqcuRrStRN7Lsu+Q+uuadF0pPLVhgNr/2PH pAhIfpu4OqnDdYZTHNx1pqgWKDrzD7qSSomTprG8QWD3dV+oX5ELWmDkFueqWGbIu5i/Kv/wlf DRLIxaJAOPSQRr662r7TvYD+vawmYsBSKEnj266r3gxS9LPtQSRmp3/eHtZX8NmTKviDw3IypL KnWE87nM8RZo8TyAELsJERc3jWfqZVYAlRzvS4mcQ9WWOJodoheldNt0+hof08zlAuvH3k3ygA APc= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 11/14] scripts/ci_build.sh: Enable deb-src caching Date: Thu, 26 Nov 2020 16:51:05 +0530 Message-ID: <20201126112108.3320-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.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?1684421684925742784?= X-GMAIL-MSGID: =?utf-8?q?1684421684925742784?= 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 c0a032e..fb458ae 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -184,6 +184,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 01:21: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: 235 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230642oou; Thu, 26 Nov 2020 03:21:42 -0800 (PST) X-Received: by 2002:a37:5f42:: with SMTP id t63mr2586925qkb.236.1606389702003; Thu, 26 Nov 2020 03:21:42 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389701; cv=pass; d=google.com; s=arc-20160816; b=hd/fnH+tKJyl49LJf+EwqJum8b7RxCjlOq7MQG081GoeUPboq7jZ66SeouaExJxUTy YgCZQbjLoU4UvrzeLYCanyPriDCE5idNxlS/Bt50Z2Px1h8sIQFbliwzEcGDKE4/jOIa hUVNmmiTE/aJgbz6KKMEJl8s8M7GdNDr2DHyNZvHCsRrvgs92ZZv3pSjPT7hQTc5R1zI d3YX/9YbEu4nY0+J5ms3dRuFfYZU2jFK/gI5ebI1eBT2rqt4iKsf33bMlLPzSilot056 zYO2J7myMpmUffYBmTgkGpQ/NAAN0EvxmyxKZ2LayrSuBrHPretXfKX/UDpYDytd0XKC Uj2Q== 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=4I3C3cUF20o40bsiiBETn9CI4lbsiz6vB8iAkGmVZUY=; b=pWX2T2x7neO8dAiDl7NL4hzrEyVESwXgOcQmViRWjmUOnL4H21Db98cpVFH5pA4UY6 wxF8P6yy4H2KV7dVDFMkPxM88TBhtWztXU5ovU1RBSD/ES9Fpoo74utfK/WyZm4Xtsrp oDaFuUjIuugdHvAK1JuVx6lqUsR/2b+bqa04qeV03oDHp1jXd8oKgIcZxhWZzHtacl1B vCKpqqFDmSf48K+c+2e3ZS0ALfBojItK0EcpWPcuBkfFWJ0sMsDHgFa2JjyX/3GfEw7C x3GTdmlyLkoU1NGcWXlH7ANQtsdy27WQnwDFUVYJp+eHdNLzJ1dVp1vem6oZ3rPUZkN0 z14Q== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ZvOZ9XLt; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrm7736qkgqeuzouhdy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBRM7736QKGQEUZOUHDY@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 s4sor2975608qvq.39.2020.11.26.03.21.41 (Google Transport Security); Thu, 26 Nov 2020 03:21:41 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrm7736qkgqeuzouhdy@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=ZvOZ9XLt; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbrm7736qkgqeuzouhdy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBRM7736QKGQEUZOUHDY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389701; cv=pass; d=google.com; s=arc-20160816; b=DnRvZdjzSFjbsvpsHMDpt/nI3iiXY38tNFs0bhmOxZ9cT6QRfSscvY5QamYR+dnjuc W2hQDcfpbHSH7wVpmoxCWG5nC05Ebj1KcKh7fuimYlfR6C7YN3LljRVtJtTTEQk1dh00 8F8uNi5Onn9vH8QMqFvY2HJGqJ7f+GSKhkvFvEKZLO0D0FsLUKcQdnHlaoZ9UCLLnbgC cobBHb/zHlxhjWjnxn+X7bBhVDUe1WxXm2RB0r5J/hyH94oDozNX3zobcvfG/LE0oI6w gyCy3PsQSOKtDKxU7UQtivCeSxNWWozhJWPDw2aCdsj3D2Tw3V0CzEHupDE82u4NimPq rWmw== 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=4I3C3cUF20o40bsiiBETn9CI4lbsiz6vB8iAkGmVZUY=; b=bvpqiIoOXftgbFAtxlmwgS1VSGQFWW58ADbKIw+1HchTtfccWSaj6IXj4XknLK1L8I llj5BzDMGKPAp5fPZ+TbC7C9utCzf9rzfNYrNQbFadFx7dWgZ3ZZWlRqas8kyXXvChGx m4qePx0LUt8h/GdNmOmKOxaaM1GH6T3M0gwXs0FUDbaWXOwm+XHnyr80cuC69pYdhOOw naak8TA7thOmlxujaaisU/5OCBWeRh7LZWVK88AFiuQXivrHcePd492iXGPaAAyc1g8d brSQ8cEEaPlW5n0QfNKBBeAzMhcGGzNWMtQ15JG9vj7oB8AesqXDJNRvHqe8c/YMgXXF 37KA== 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=4I3C3cUF20o40bsiiBETn9CI4lbsiz6vB8iAkGmVZUY=; b=ZvOZ9XLtRVWHpSztoGz4cnaA/Nvuer9mmdTF4jiSN6PAu/YzYIJAJ7/RpWBjl/DFkM umWV80tBexAtR6aTeOL7S8uYZd4XntYduDdaHNNUQjwhGs+ANaLSXYUUE7tyA6cW75jH ZwtQRr/ThylV9mIlmSsvRHAQq01DzhuSAjOGEIc1VzxD1LplkofWNXPZ7b8zAqUSQIOd SLoNCahmQx10rNew0f+xlSvLjNnj24ohn0NmymlgqLJmThPZ5SQd8CTdAL8326S+JxbW k+OreKMRy/CmlLluvZ2e/nryMSs+8VUAv15W53+x10tt4UT8ROjfpUQL1KxsbYtsBEMk CLYw== 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=4I3C3cUF20o40bsiiBETn9CI4lbsiz6vB8iAkGmVZUY=; b=LoLsIg9Qv06o3PYxgyzRpw94jfp7CZOetscvbdazZqTrgGxkQ98sHK02RSGmxbSNxe JDcbEPHdrE+AftoIRRNPRFyp9iDrvWWAJL9MCjv8lX1zVaYfS0EiJKcAW+Gx+3PKVDLZ xTDoT74I1ybCmnj8rg+5vbNeOjakN63jTkw71H2Qp/KDAhgW8oU/4fg2lQlSRnrxo0IV X7oPsxbOVBNGCYPpEJUy/OuS4vBvlhIQLEc0iL5+bPSeAukt51/rWFEWNZQbf9Cp3HeB 8Nuhe7b7nNdd2R3mzmK/0E4M4Da7yxFh/lh5g5H6yriEu6vEEbrCccsmupn7WiIzergk 31rw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM5334fEG8vIrv1XgMZ+kQs0BLt2Jk4jjjEmSYZeKD33K/yUXV6wCK 7GQAfm35FTKaQzbZxZsSaCw= X-Google-Smtp-Source: ABdhPJwDTTzWyrAZ3Qco0zRmdlJ0XnNsOlj7g9nKfhj//GXAEqSVNCKoGqzMjxJ0aUEXF3Zr+agRPA== X-Received: by 2002:ad4:4d84:: with SMTP id cv4mr2599537qvb.14.1606389701691; Thu, 26 Nov 2020 03:21:41 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aed:36ea:: with SMTP id f97ls730783qtb.4.gmail; Thu, 26 Nov 2020 03:21:41 -0800 (PST) X-Received: by 2002:aed:2662:: with SMTP id z89mr2605799qtc.70.1606389701364; Thu, 26 Nov 2020 03:21:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389701; cv=none; d=google.com; s=arc-20160816; b=QIGWgDJAOmZR++tii56rv+Xnnm/kS5ON9M4L882xlaOKd/+oFgSA3C8dO4O4PJ1NAP rNk7DdCk34mCaHVwPKvHX0ZWGPG1CEsmGemTgXw6KqvM/x9yBi3EmSEexpZ/JcrRJmZP o+VH/oo8OpF9ZQJ7SVRqQ/7P5R6mSyU+vULbDxdBqnASHl+Gs72RQBDsnRtQYE2rTj9/ tBUIwpM5ozFYl5U6VFkH/oNDcXQSg9nEl/Z9BxNowTnc15240DKAKaa4trYUvstq4EGc rAt8y3NJEDI8PBYlbV7te5S5h/RtvGmhokToxEknZ656hJMFtWqVdf3oguMaI1PovXi/ PYnw== 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=aigCLrg9iddFMMpm7Qz6QMYhogKgRCOxCZ4c/9IUab0=; b=R/I6lONhKXkupQnJIqJFVHrS2/oX/SMOyGsKp3ox1exOXBusBUl8kB2KEI2rblYkgm YXfHFVJmGPmlorCPIzC2i6L+Ye668cA4z8mpsx3jC8RZH2Bf130zRlmfQny12gFVC/Wj RCkOKWmXdwhXUUWZC19F28wbLu9ffOJ9GDLRF906Bs29DgHXMsvmSbFC3COU1SS9uP+D yMZ0Sy7f8jb9KMzyj5D0Rdg2nVXjt49f38+rG4w852eRRFf47WnNgZ/ykfBLJfxupD2j K9bQK8Yy0jkEC9eW6HAcSd4DImyEgPRlJio/vhKOkMmHjoDCiIDiCb75WRjNBvoZoDne lXVQ== 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 f21si113872qtx.5.2020.11.26.03.21.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:41 -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: pCV4cARRzrr+FwRYuOUZeZS0aHk77P42ZgCEH6i8V7oneVzitTyWSDneMc3YluaNDIo4/sBmzt gWmO/EgbC/A7IO8eRT3sNfvFbFZheNyca26kO6wFRgzA/l9SdYWl6bJV9bzGJ6YWbZXNRaqxcl Aqsqm5YpyKIY4dzC2Fec2+/GA3Es741M3p2rohaAIXZJ4axJCH1h0r5N9o4rotKPSl6g+8YoWz C2ZDto4bgW06SzdNGzH+Cc6tOio43CgRLVYRC/j+YlFfE76PVktvgkH2ZLDGMMT98McM8cQPMa JV0= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523589" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:40 -0800 IronPort-SDR: g0Xs4JP2fTGLytFcncCQ96e13nQSiXNh4QVX1s/aPJtQXU0ZxVnY+lu+z6ywOgZ8yq776IAK7A K0Mx4ur7OhfjcBAfeTraNAsuB254cA1XwXH6n6bPdrsdK+SJ9BFEG1+EDdFZuG0qy4o2FkJ5r2 VFAR9QFAMMWDhVnmndTJKkVnbbV9tUVU4S5RPNnWanGs5bt7v2N/fN54JTr2DKaIphz/eP4Vw4 XbDqwTK58Lxp5vUz8zGnMV3BYCgvSAWdiCZvIr73GJFgQHfEuaOdJZe8IjTjqlylDB3H/xhiA4 mqw= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 12/14] rootfs: Fix possible overwrite of existing resolv.conf Date: Thu, 26 Nov 2020 16:51:06 +0530 Message-ID: <20201126112108.3320-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.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?1684421688096136919?= X-GMAIL-MSGID: =?utf-8?q?1684421688096136919?= 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 9142f12..b6dc2c8 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -185,10 +185,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 01:21: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: 236 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230699oou; Thu, 26 Nov 2020 03:21:45 -0800 (PST) X-Received: by 2002:a05:6214:20a2:: with SMTP id 2mr2513852qvd.27.1606389705284; Thu, 26 Nov 2020 03:21:45 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389705; cv=pass; d=google.com; s=arc-20160816; b=pXpGnmTq63aCOZsjRjlNyddnR7tXVYwgqalLUcadUlrCI6XkTu2GF2kt2ebbMbnuxF ERvJD4AEuf5bgC3ce7j1iSn6yYX7Fn4LtgwW9VhJX6lK5N8ytmLmWL2nd/sP5ehPo/RY mVXSrZSZu7HoaCXMPtCEZzzpXiBmtqDT5v4u39TlcregH5GETLgjC29lHRY4CDNYzRqV Uw2A8ULmJ4+ps5iUozuibWP2xUBdKWa0DlYvYPwUMywo7udwXa9W+nwykzkzyChsmLg2 05sqrryY/HSn+v+e1Zt+8z2qdAsQmXG3rhQvm8QsrTu8zYUZeALYb/9I8xfO8bRZ7LO0 X82Q== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=c3gs1HCcPwnBmXE/DeLfImDHxkE+amdZszHdUpeOD6dvl3cTqb573UJMpl3Ob/tDiJ 8eBI8/R1JpNmVl7zIUApSLvyR/DdA8NMHDM2t53jBbpicF/Ne26gvr2KJ5NAwn03EWgX bFrONU89lPC8B5lASqfF895eNlgeRoqUmwDnhwIlZgm9AqU3ngb8I4YXPWM+SXtnjqNZ cpZp/lLSDzT8tZaKHCB+o6RgtNPsKq2AccoxoowvHUlsx717E+Gci3kWiyQV4VkoBt6T UwahlTBQNvfR/oLYOlKn0vnjyQ0gxK0Golo+D/1uoIBQtR1B7pRkbJZv6ShC9LNbHgaB UrCg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=cw+HogVC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSE7736QKGQEUGIHWFY@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 h11sor3000163qvw.47.2020.11.26.03.21.45 (Google Transport Security); Thu, 26 Nov 2020 03:21:45 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@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=cw+HogVC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSE7736QKGQEUGIHWFY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389705; cv=pass; d=google.com; s=arc-20160816; b=rr/yWLh7SuuJuQFVbksNwHg25P+Ao4NT/bEkEcw6895O5NXsjJ3FTyUJZzcApFNeB7 is13DEAo0lGIQpMakxbSEPKQNF0m4CQJ6JPefWWWSUHsrTNroL0UTRvVnf3vQF9xvKOO 9c5kp+ytXgTYKTg2Pt833qt94B9QR9vfTyEafdrTKk4kHXKbcL21qOSjGFShVpjULlAM 30pMR4S/2N+2QmFew7cYkEgb8bFkVrHJzR4dnDA7d8jf24YtbU/07xb5n6VCU8BTwtqz SoQ7QPJC2pfvSAj4b+qaOHan8BZmgl9qZgFYRgipGmKNMkG+AEoAgFaVpQM0WJU47PFe E6wA== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=vsO+UHEU1pXFp3ZclTUOii7L/eop5lA74+7aHjBK9tcv4r6gtXRjkfmYwb1HarSc6M Vxo9XSnCXj8fum70LCTMsbd9emU44vV2/G5iWacysQh/Efn9tOz+5vvpF6BhxAIZhzNl K6u0nSbVY0TfPJ12aaTmH/w25tcJnOiLJzx2GpUBiPgbZtTOeofn94IOYpqBPKJmb8M2 3TPqJl9So9vnoD7p7BYoYXZ/6an9u9tgoO5fTu/2nmk4psTx7cwmis8AWUxPN4qbUXLO kcJxS9wF4rM/pOOJt8LTZh26jcnSfj3wnIdQCr1mt1frfmrQCmKuLRO6wumtz7E5FE6l Qusg== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=cw+HogVCGkiAT8Zfs++ipPmIiM4jirpE/fN7YMLZzktQGmrm66lcjiFqmeHD0A7hyN K8IC5kGm9k5VDCbHQc3PRT8KXEHl8wZfDRsm1zADJ60iIzHbfJr8pwycv6aAYqWHGFZv JBXY4BcSwlU1moABLF/hCkHHZFejeRDEW4ZGlzxM4tDfNYpNUeuBT2k2SvPSz6VoDalf L6Q1Hjgdv5stwoAKjKeMVNMHwLsRMhP5+zFR0VgpLJbJ2+Owxh53aZLVDjVUxCISe8Bt xeYpMjqVgDIfqSuyzjv3nkW35O260sIaN8MMxyt8N2i0bWMnoF1Dn0vXlpzLhKUIq4yR aVRg== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=XIsH7kD5Ft9e2ub4pGist+YUio7Ufn5ySPFvXwMtUdW9Az5HDix0Q2lEucBUOdtU04 Y2+fAP90O71e4dcvioZorImsN3E+ovKR+IuyjIiVFQFDQYjp9xb2FSmzaB2N6bJQXvRF 0YvbdLKg6GZAvbc+w89nMv+kA3FOAF24JKSFdqht79z5HKdw2CpSJDC09DZ00xf8gegh Bvb9HiddCryBMBtvyNuAcov2S9eG8qn6glSt/2ST9nEMiF3pVKTaSkGrVx7RbZgrdH0O jtUCOwW90NIrhHok92zNVRbqrEV+Bo6NLAjRNDdJtzcg+9FKxUfbA/aR6zrYUvx28Jjn RyTQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533rPFxeObcuQLaU6wzLEwHQJPw6bTSz6AJ+EmPyxK/fVruq2jDE OnQG8QC9Cz9reAucmZ7FUyM= X-Google-Smtp-Source: ABdhPJycRWfrfIW+NkgnEaihFXLswqqw9mHbojomHrAWLCyjsv4XhtaugSWeJtHI51jDKXnJtl8MUA== X-Received: by 2002:a05:6214:20a7:: with SMTP id 7mr2523940qvd.59.1606389705005; Thu, 26 Nov 2020 03:21:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:a493:: with SMTP id n141ls905494qke.8.gmail; Thu, 26 Nov 2020 03:21:44 -0800 (PST) X-Received: by 2002:a05:620a:790:: with SMTP id 16mr2604679qka.169.1606389704637; Thu, 26 Nov 2020 03:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389704; cv=none; d=google.com; s=arc-20160816; b=H8/2swzwGpvmoAfs27FmU/RWoBwWDWhnv3HorQLa3X53Xa48kJ4rduUDnLqPlqXDxA D8AIAg2dW9tGUsSD8Ipw5Os6ELiuW0TUFPujrdG43gIX2arSL8vdPq/ElCt7FeXMxUDf nh7wRhTfCqdc79O2rfOL19frtcmrZNpOFynbUIrZJjMEhrLn706hGwOeHavK4rwDRre/ xZLgWCbcyBCRHq2PkZCdQmo3ZySBTYvQ6sOY7FJqk3VZ9flsvaLK6JpiBFJTQDf/mw+6 /Wg5EpAl3i0CURes68CZKRHw2HVeuA8w0GXlpaU6TSWIIBlDvyHYGq0OV7FokIXDxkED kNTw== 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=Q48lo71cSZCriedaNwtn8N76N/U2GGAeSpoWv8edEFg=; b=tuXXmMgRhWxOqiFdCJ7pxtCU1yV6gWv297pwvf2JLhC7vs1K6RXLqdIF76kKeN2AHI VJ3gpNuZL8p0FVgbVdYMJ5yFBWcjIgERl1R6aG0EkgKrylMHhVle7xs43ls5ygXOTXBq qFXUeTErkcUOE/V9FlW6zF4ByY5XfDDvKIOhjG4n42vdJkChpqXEzRVUDiRuO6lPpqop f5ZZB9x92wPc+R3jb9l4qif2sOFICyCcFkwc6vK1hU7ieDCaSMSx5ilTynSOy3qlKP3g sbcSNQN5yGiv8CHuia4XVRJcBIUGBqdzEMVZIRKb2gg81eIKqshvkmoEs8h8vIE27Qsz KVzA== 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 f21si113872qtx.5.2020.11.26.03.21.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:44 -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: K2a7DTJkJu+vAdcP4EmhYVF56OfZTwaWEn64gpvQRiaygGLte4Lg4CqvVXiwwTN1B5Q1ZvRXS7 w6C8o6VLzUCt2FgYeiS05ZgV2Mb9nOIEppqbbNF5kCj8YEY6NrvDGvyXruMVud7gAszE1RZSIF 3974shqdEhKGp48MJEcTq6W7x0uWGz97HkK55XEhp2L/AzRCpijRo6xMKOULBD85pSx54hq8ve icsxbiTP6rBlnDIuFAR9DoMr5aj/r7TKE6eWe9bjIJrRnKMu3tGgslSfQgI2QfcROcInT8psX8 sz0= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523590" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:44 -0800 IronPort-SDR: IQdwUck33O0lbu+4u2lmFPyS9woRkFs1xOOMHu/7HWQtqZdhmzGmMlfGPCPj2nsjt2yBVc5G5K /Df1xFoyG0aqba5u1LQY32a7/AAeenIWblDXvBVeZI2c7/TB3eHZ7gfOXaYJSi3UuAWJEdwFgE FJ4cAVGd14uddSQLMpfT3b1BMBuM34JOBABeiaGCwzD0e5VNrKM6JleKYG+q4hKFHgKIrOlqoz C3+/yPrPGjNahsKOyoOpSVxWfSJ0/c8Qnje8GN/B9GmXMVv+2rpHEjbRO5EJKFYn2ljQm6HgLc cHE= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 13/14] rootfs: Handle failures when postprocess is rerun Date: Thu, 26 Nov 2020 16:51:07 +0530 Message-ID: <20201126112108.3320-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.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?1684421692071537856?= X-GMAIL-MSGID: =?utf-8?q?1684421692071537856?= 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 b6dc2c8..f7ba4c8 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -189,6 +189,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 01:22:27 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: 237 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1231642oou; Thu, 26 Nov 2020 03:22:56 -0800 (PST) X-Received: by 2002:a05:6512:5d7:: with SMTP id o23mr1163709lfo.272.1606389775882; Thu, 26 Nov 2020 03:22:55 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389775; cv=pass; d=google.com; s=arc-20160816; b=F5ieradKjMJnH1qXJpG7zhYE023HNcj9weKlopHP9Xi4YCVE+m24j0qoQce3kQYsq6 OLvmdiL/O1rO1IUi8tJHrq6/nLUk4i/DlRGtRpMq8I+2xN52gGlRNph5Alpfzub2aNgb FNm9HzElMOvBcBVRekO8qag/UaK0nz7/oVbBRe2K5PcU+pEeCxnppV8PsFkFdpSziZ5Q 13IsuWHAT1o6d+lvn/KY2oaPS1rHAOBwW5xG+p9BXayMhc4xw0lE09kLVYSX2zhxgroS c+cuWGPiy+fP7Wgj5AbmdeMvgfpRL8ckQ/sDdgaY8eopPHIXkIpVhSZdQOKF0AgpFGeG sHcA== 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=DI5ONKjDZNC1a1dOGE8u2jHf4gL8RjMZnR6OSdsyhz8=; b=tvuVLdyEOEE/SZ4MKwzgSxEaOY0mzt8HV1lGYVvynwE7My0AjRT80FRU76YOcV1m2x voZacX4wuLpiruy29vL74RvkoLQHFKTCYSmAkEpFFhLy++LFmWGrg7+7b+6ZM0AnzJc0 xd5ihjstVQ6Jei0Wev4oUfh+Cq+VI7tAeMzYreLQAsO8JpC4zWA2K8/PlBeC9xFHAoqH LdG7uyXgHP1WJ+g8OzMygoK0FzBbTCP7dEFVeBkLaoPhMsMUYmIho21Fkzf2V8ySR4OB 7sG4xtgv8+9V2J2PXEacCI55sCAQCCzuQR5cG5yz5jz0clEYWvMZPAxi0R3O9ocJeEOb 3JHg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=GskvrVOS; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbd5a736qkgqevg5x6sy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBD5A736QKGQEVG5X6SY@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 g10sor484852lfj.108.2020.11.26.03.22.55 (Google Transport Security); Thu, 26 Nov 2020 03:22:55 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbd5a736qkgqevg5x6sy@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=GskvrVOS; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbd5a736qkgqevg5x6sy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBD5A736QKGQEVG5X6SY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389775; cv=pass; d=google.com; s=arc-20160816; b=Okd/2S1d5Je3yfjKxywgjVHiamvDtSIC4qLUDPG/TNlwx5CNCyJXtB9lN5x16+mpEH 3nKFzR5TqHlvLZy3kSXPJjn6TQezw//QvIaVZlEs5mA2l4eewZPEtCE+9KEai1lXUyjv mgrnsR84gp+m02CcEBdkTIYYUaHOdbb5yxTiVPOgNl63Jj+iHDAfLRoPfOjZo7A5duNZ Mg4uGhn6vKAdpvX++p8HCmk99Pta3zmvUP7w0YMDeuBIzqpprS0V4AnsttwLFDnN4/Hr oczDXBV/VDk6Wj85tkFBO2L4MRMPwvKypxuk8plv3chxJCpfSaqJ/NoDzqK54wccDrvZ kzdA== 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=DI5ONKjDZNC1a1dOGE8u2jHf4gL8RjMZnR6OSdsyhz8=; b=kv7+0Ob+W4pNLKuXbHDZXkWir3KvByD9FfWnB4QsXx9Wpa74rYRKs2x+D6VdaStlbd VRxHBoDw8u3+ym6Nb09xuiLExct8EIrtcw8iVwlsCfKTww4UmBeIRfsj4xHnDY5gqLYm pLyd1MUc/6uTkYQ0drS21/5LSCf6PCnRgytCvsdxWW765B07KrZNxMT1Z/YZ1R5VybQg PoQafly5b72XUxRQyrprtdtfNpwncXERM97TDBBErz0UTO5T7uamaiXLT05TQwsCN4Aw QWuWO5TjyNF/yuZeXTesFlbr6NzoDy6lTq4WuRr4Aew9wVBr7apkVLYHAPzZxHX0rRpA v3ug== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=DI5ONKjDZNC1a1dOGE8u2jHf4gL8RjMZnR6OSdsyhz8=; b=GskvrVOSNoQTbRBFJgZkVWXQNjEgf2ead9fkYKJXKpgF7ceIb1xKk+CQjvl72QzjtS zqlVDI4Bq4mLTODAuNLo7mrzAAuXoU2Q1aujX33uPfnWB7gFoHNl/7DJAawnHibHGzBf hs3eF90vuts7cmrNd59duXeiix13IhZdMy9GqGVeiD8AZwYYn41Bc3hfu5wT3u3pu5Im cRjp1VW4xgtCbJbdRmw5DvfqQySSBWBgzQuDhFlG+/0UmCd9q9WyLhoaWkTz9gqezelm +O/6LZGpeGY3yH4dacDdiZo+xDNXUXA9Br62dTceItxAEIBTlNBrd5H8xxgidQuU+YuI f+oQ== 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=DI5ONKjDZNC1a1dOGE8u2jHf4gL8RjMZnR6OSdsyhz8=; b=TTm/s7mc4D2y+nv7GqxZIDyrS1co6RNTupsV6DdmBcRnHCeTUDvlGLpK/XiifUpz+L 4QzRmKFLw0XQeIv41fA33B910BR9zhARvoSpNphZ5RuD218PwGJE9O2SwngZNp/WF6cl ZD7u5PRUHnXO3PLOp4mXfJmHYy+1/XBwOjX8cAtTBcL1NjNI6Lpzagb86s6dyFx2JtMD 3iNFv4atQo2bp+n/hmJRLk2rb4PmVc4AXnGPHscj/DRwt9mhh82X8th6FN/72yuMDxG3 cI/aNTRDybR/CDoGKrvW60X3SDjtKSLAsUV5ycAN54YL32VMzVfIQfTyVh2aEgGekWXv Iteg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531RQvEBk77rt3gzEZQ1dC8m2ntvci7aBeV9xH5anhpn+o81hidE 6q8QmpuCUQu4VeO62mOhqo0= X-Google-Smtp-Source: ABdhPJwrJGNfsDMTvCwAmblCUg6bzZ+uBTZT5Tr61P2aB6B5jAk+aCJj9tQ8WQI2pWu0SSK8e1xpoQ== X-Received: by 2002:a19:154:: with SMTP id 81mr1215577lfb.161.1606389775549; Thu, 26 Nov 2020 03:22:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:ccc2:: with SMTP id c185ls1028729lfg.3.gmail; Thu, 26 Nov 2020 03:22:54 -0800 (PST) X-Received: by 2002:a19:c815:: with SMTP id y21mr1079872lff.589.1606389774402; Thu, 26 Nov 2020 03:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389774; cv=none; d=google.com; s=arc-20160816; b=WBOGGVxUaiwHWprsd6YscKOhdDbff0qQdiwEgIKMfY2gRRENzevGNVypZ3R5gzhFQm +pAoCmHZNLSrXGYmIEge05VxNH5O/ue6+6xxdRenE/dXg+nezHXVYqAXBgDjXJpB3R8B htVPES8Lilsf4nIafpiGQuTpqxPqW+XhQD5jg9Q+uImnUgjeybFgx76zzXlE9eEP53l+ WmDD130zJDpc4QqlAl9zGY5nnLF/ZuG2Wah8y9TvPm4BA463nABwqPhlXtfp2JdYi8oB RcDD3gCR42dWW1qygSr5QI4r33EOjCQs1F390Dh1SMjwb323m+MPieu1rfStWxJ6AtnF d7sQ== 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=lfarbXaVgFViW6PH8jVECCsBxs0yaqU9vngv2YHNKTY=; b=I+zwJsMus3pVxRcOWZt5/heftGdm6fYZjk+prlW6MdMb9XKPpbb+t4Y0yOfGa4KW9h YiyTx0MWdq2zSoC0O8MpqGDtEJrkQI2t+ysj02ZMdSHpFRV9IAxXeHCtBhvjfWTb4NW1 kk313eYJDGGl2aNmCtctyaOaU2lt7Qd3tLPi5Ns52V1aqlBqt/3RpvQKA8r61hd/pwnO 5iXWXtTuMRbDVhTv/ram6CEgPkAUZcRHGNF3IyA/AX5nN7OD0Vpd81pEoP23TRVpow5/ 1SaszwtSbeYgazcY8l1tobnwB+J+JaRT2l0S9cTb5Yj14fbG9GTb1TsjJaMb8G8OmPqn w2Jw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id h4si160165ljl.6.2020.11.26.03.22.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:22:54 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: 7z5tDN3UWDgXlTj3VIQ0YrFIdJroNlPgp+fST2rID1cwkfdmb+VoEzZJ0MJC5IBpR03G8s0S0Y V6dkdrwq3mToDcTgFV6EiVshEnNv5sF6bRx6THCyIUvG9aWztFi8qbIhKTKzL3b4Uek6kmd4R4 VOvi+IUd1+IGe1ktAw7GI4XEIL9Qa4VtJRZ1AwX2149OxaMc4CPCmo/HFbccFAMo7JjoFgmhIG XJRqFsdsLamNaJhWECzSmuxh77f3ofTAAnRobU0xyIqCsPHuNSnRAhh1SxkuZQ7bGjgEcVCc89 wkE= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500583" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:22:52 -0800 IronPort-SDR: /XM2ZGJK0tJlnSPVW0JC4iompyvAfmAV1MmNCZE+lRzaB+wcAYZkvWBSi4pz9FxyqqHZ9qbrdc eERyFg0Jw6mLbDjLrO6eA6NDK3D1Tk5Bjix72lKrI4Vc9GQ/OkE0fMAgKXCLaIKlh5L906KMBE GiWqRaX3NayTEMhqisWw9Qz3C/6HVAacPknE+LkrtH/IVlNrgUm9uk/D07DQLzcGmJ8bkN7bFC pHZ3aliFx+LZ+oU63cDDSeyU78SpvsDSj2fM26fwCRD2GyOkvC6hw5G2WdZomn0Rlni1zDOwwd 4lQ= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 14/14] doc/user_manual.md: Document details about deb-src caching Date: Thu, 26 Nov 2020 16:52:27 +0530 Message-ID: <20201126112227.3395-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-5-Vijaikumar_Kanagarajan@mentor.com> References: <20201126112108.3320-5-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684421765157205872?= X-GMAIL-MSGID: =?utf-8?q?1684421765157205872?= 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..8827b29 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 fo deb files in ${DEDDIR} 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" +```