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