From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6698286256620568576 X-Received: by 2002:aa7:c919:: with SMTP id b25mr28669435edt.274.1559566300408; Mon, 03 Jun 2019 05:51:40 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:b806:: with SMTP id j6ls4843549ede.3.gmail; Mon, 03 Jun 2019 05:51:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVRXnUZwWhjlSzow/yD8Ulj2EGv8+PXR5dm4I1OWYtWvVq68kf/f4JdzF2DKuU+BvXHFM/ X-Received: by 2002:a05:6402:648:: with SMTP id u8mr28564254edx.176.1559566300029; Mon, 03 Jun 2019 05:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559566300; cv=none; d=google.com; s=arc-20160816; b=Gr/DBnYrAmvdCEPzZYdHLf8wvTs94NoxveYk4w1nLVX16qZSYUKq06TQrOgdNUaADl kcMU7T7fPdnde2ez3x4tAxYy4ngw9tuI74hnkHzFzGmHvnfY+h0TkdcKZyDCYbrTqR/y c33k1x7T5rG31GkkpRsMKUSKYuAEF8p/QlyWrnlTu2Wmy2M30JSvVIzqUuE++oLTtjKR U/R7XiwyKT8yFeZHeHy71cb8uOHQb7WW4/hrwJRa8TWz7Gt1lFHrMvTOL6nAnObodcgB 6ffodHWddbxoU7pAbM6WF4ceRHVE2ncEP1cBsXwpGGBoUX+ejfM8bOBUqhkVNC009b57 ITIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:cc:to:from; bh=U+52Drgc+GudcP9+TdTYTTfsD1ktciEfw6MI43BxAgU=; b=fe7TXjS1tKfebcix4Cx6XtK1IuA0G3ioC4CSML4I6X4npIGnuP9NWkk2TrTHgQzbkg B+5dkN4sbs635BuAFhn+PYGhK8td8LCdfj/0UV+PGZJLG6nMAUqcmjUyLsIOaiy/Pd2X IGtCViiycY/GNr/4ByKVVg3N0DSfpcqJz4Nz5I2Q7KYB6vjISamZgEFS7MCoobX9qt3P w8s69U0ewJ+Dvh2CarIGRA/uwrLA0QfzTiayi/uF1R7XYI61dtWzAUrNxpRPRgTLbjFc EoUYdjEqf+tArdB0q4Uq+/02cutcVLPZ21QqFRRlO8zpvFj1tYxjoHIkWhp/39arSqcb qpTQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131]) by gmr-mx.google.com with ESMTPS id a38si543350edd.3.2019.06.03.05.51.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 05:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) client-ip=192.94.38.131; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-02.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hXmR8-0002iV-Fu from Cedric_Hombourger@mentor.com for isar-users@googlegroups.com; Mon, 03 Jun 2019 05:51:38 -0700 Received: from packer-debian-9-amd64.localdomain (137.202.0.90) by svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 3 Jun 2019 13:51:34 +0100 From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH] buildchroot: mount base-apt when using repo caching Date: Mon, 3 Jun 2019 14:51:25 +0200 Message-ID: <20190603125125.5214-1-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: 7+ChwAa0iJrW Debian package builds start with the installation of dependencies. In our case, they get installed into the buildchroot from either upstream package feeds or from the local package cache (aka base-apt) when ISAR_USE_CACHED_REPO is set. For the latter to work, /base-apt obviously needs to be bind mounted in the buildchroot. This was simply missing. Signed-off-by: Cedric Hombourger --- meta/classes/buildchroot.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass index ea1538a..b7a8ea5 100644 --- a/meta/classes/buildchroot.bbclass +++ b/meta/classes/buildchroot.bbclass @@ -38,6 +38,14 @@ buildchroot_do_mounts() { mount --rbind /sys '${BUILDCHROOT_DIR}/sys' mount --make-rslave '${BUILDCHROOT_DIR}/sys' + # Mount base-apt if 'ISAR_USE_CACHED_BASE_REPO' is set + if [ "${@repr(bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')))}" = 'True' ] + then + mkdir -p '${BUILDCHROOT_DIR}/base-apt' + mountpoint -q '${BUILDCHROOT_DIR}/base-apt' || \ + mount --bind '${REPO_BASE_DIR}' '${BUILDCHROOT_DIR}/base-apt' + fi + # Refresh /etc/resolv.conf at this chance cp -L /etc/resolv.conf '${BUILDCHROOT_DIR}/etc' ) 9>'${MOUNT_LOCKFILE}' -- 2.11.0