public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Claudius Heine <claudius.heine.ext@siemens.com>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH] buildchroot: mount base-apt when using repo caching
Date: Mon, 3 Jun 2019 15:56:51 +0200	[thread overview]
Message-ID: <b182f623-40fb-99a4-d702-fb174ac5d85b@siemens.com> (raw)
In-Reply-To: <20190603125125.5214-1-Cedric_Hombourger@mentor.com>

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 <ch@denx.de>

> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>   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

  reply	other threads:[~2019-06-03 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 12:51 Cedric Hombourger
2019-06-03 13:56 ` Claudius Heine [this message]
2019-06-10 16:20 ` Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b182f623-40fb-99a4-d702-fb174ac5d85b@siemens.com \
    --to=claudius.heine.ext@siemens.com \
    --cc=Cedric_Hombourger@mentor.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox