public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@isar-build.org>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH] buildchroot: mount base-apt when using repo caching
Date: Mon, 10 Jun 2019 18:20:10 +0200	[thread overview]
Message-ID: <1911496d-8d70-31f7-c735-b13829a3308a@isar-build.org> (raw)
In-Reply-To: <20190603125125.5214-1-Cedric_Hombourger@mentor.com>

On 6/3/19 2:51 PM, 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.

Applied to the 'next'.

Regards,
Maxim.

> 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}'
> 


      parent reply	other threads:[~2019-06-10 16:20 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
2019-06-10 16:20 ` Maxim Yu. Osipov [this message]

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=1911496d-8d70-31f7-c735-b13829a3308a@isar-build.org \
    --to=mosipov@isar-build.org \
    --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