* [PATCH] buildchroot: mount base-apt when using repo caching
@ 2019-06-03 12:51 Cedric Hombourger
2019-06-03 13:56 ` Claudius Heine
2019-06-10 16:20 ` Maxim Yu. Osipov
0 siblings, 2 replies; 3+ messages in thread
From: Cedric Hombourger @ 2019-06-03 12:51 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
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 <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}'
--
2.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] buildchroot: mount base-apt when using repo caching
2019-06-03 12:51 [PATCH] buildchroot: mount base-apt when using repo caching Cedric Hombourger
@ 2019-06-03 13:56 ` Claudius Heine
2019-06-10 16:20 ` Maxim Yu. Osipov
1 sibling, 0 replies; 3+ messages in thread
From: Claudius Heine @ 2019-06-03 13:56 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] buildchroot: mount base-apt when using repo caching
2019-06-03 12:51 [PATCH] buildchroot: mount base-apt when using repo caching Cedric Hombourger
2019-06-03 13:56 ` Claudius Heine
@ 2019-06-10 16:20 ` Maxim Yu. Osipov
1 sibling, 0 replies; 3+ messages in thread
From: Maxim Yu. Osipov @ 2019-06-10 16:20 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
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}'
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-10 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 12:51 [PATCH] buildchroot: mount base-apt when using repo caching Cedric Hombourger
2019-06-03 13:56 ` Claudius Heine
2019-06-10 16:20 ` Maxim Yu. Osipov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox