From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6698286256620568576 X-Received: by 2002:a5d:5607:: with SMTP id l7mr12400064wrv.228.1559570212257; Mon, 03 Jun 2019 06:56:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:5f86:: with SMTP id t128ls914876wmb.3.canary-gmail; Mon, 03 Jun 2019 06:56:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2dKQIq48MMcQVl6aWi09PHqW+QcQzvoLBeAo7RaLZ+IiH9C0AW8rbEIIV+88R6aH0ruIX X-Received: by 2002:a1c:c255:: with SMTP id s82mr2671351wmf.6.1559570211825; Mon, 03 Jun 2019 06:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559570211; cv=none; d=google.com; s=arc-20160816; b=sCvJZ96dVdnjaTmt1MtJqR5de33uHZfkYRbge/ykW/2QzU++6s0gZ2HUafzp3/3jhF 6k3xjI0AJEClxVVk+RRWdi9EUXPgika5XNPHSvwJoNvVu8Gxfs80njJBfbeSYNk1OViu 1AqlRjBcTDOPTqFLCABmgCZQqyH9lGh+xLez9kRFUBENrfVeLYUdULlNdLe9VJj04jJX g8ePmQ66qBL9p1G6vr0pPNt8LN7Bh+y3iG9T5XQ7p/NCgm4bODuj6uc7pbUOKlIQQL3b fX8xnv6+yAhIFL1l7eb5Y3uHH2geO/VYXlWahXPfEn0BuT3Wg1Agk3hmcBYqNQEbWhO7 S2FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=rHKijBbhqV4tQAABb92GWc5ErOM2ccjqLU2kKSWP6+g=; b=arzr5FpH5w1BynMb7/H6efanvRuWra1+uWVdjDvVL4t7Kk4m5deDmvnibuV7Ly3XzY /Ishdi6UoyY9vfC2w5xpJP/PI8hV8tkF54HAGTJ2xQCOGKE2iTWhTqrYyXm0O6lSKQ9Y Y9rnTylw07WWZcq/0hJ+yCoG/XgQo1wyFL+ZlVBsrBTHcENRwY+XsahW4MfCdGmKsAIe dmO1waa1104O9j+J34dYywiP13rUjBD/rm+DUSvzqa0Kl4tety+J+9vApDW7GdI4e5F7 WnIQgVeWG9y4aAAiJfkLxc4LEKc53W9ItefDU7vHO9DfcKVTU2fV8YXiEAwbBrmbzTim kOEQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id f8si575139wre.0.2019.06.03.06.56.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 06:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x53DupuP014714 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2019 15:56:51 +0200 Received: from [139.25.69.232] (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x53DupkD014371; Mon, 3 Jun 2019 15:56:51 +0200 Subject: Re: [PATCH] buildchroot: mount base-apt when using repo caching To: Cedric Hombourger , isar-users@googlegroups.com References: <20190603125125.5214-1-Cedric_Hombourger@mentor.com> From: Claudius Heine Message-ID: Date: Mon, 3 Jun 2019 15:56:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190603125125.5214-1-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: xrWRN2ySz2c8 Hi Cedric, On 03/06/2019 14.51, Cedric Hombourger wrote: > 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. Good catch! Acked-by: Claudius Heine > > 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}' > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de