public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH] [RFC] buildchroot: Fix do_setup_mounts
Date: Tue, 13 Feb 2018 21:49:39 +0100	[thread overview]
Message-ID: <c874cf39-7b64-0e05-1db0-85c5256298f6@siemens.com> (raw)
In-Reply-To: <20180213203202.4161-1-asmirnov@ilbers.de>

On 2018-02-13 21:32, Alexander Smirnov wrote:
> Fix this function to work correctly for re-running builds.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta/recipes-devtools/buildchroot/buildchroot.bb | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
> index 570c0ad..d25b549 100644
> --- a/meta/recipes-devtools/buildchroot/buildchroot.bb
> +++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
> @@ -74,20 +74,16 @@ do_build() {
>      do_cleanup_mounts
>  }
>  
> -# Invalidate stamp for do_setup_mounts before each build start.
> -# This will guarantee that this function will be executed once
> -# per build.
> -python __anonymous() {
> -    stamp = d.getVar("STAMP") + ".do_setup_mounts." + d.getVarFlag("do_setup_mounts", 'stamp-extra-info')
> -    os.remove(stamp) if os.path.exists(stamp) else None
> -}
> -
> -do_setup_mounts[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> +do_setup_mounts[nostamp] = "1"
> +do_setup_mounts[lockfiles] = "${WORKDIR}/isar.lock"
>  
>  do_setup_mounts() {
> -    sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} ${BUILDCHROOT_DIR}/isar-apt
> -    sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev
> -    sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
> +    grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts || \
> +        sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} ${BUILDCHROOT_DIR}/isar-apt
> +    grep -q ${BUILDCHROOT_DIR}/dev /proc/mounts || \
> +        sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev
> +    grep -q ${BUILDCHROOT_DIR}/proc /proc/mounts || \
> +        sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
>  }
>  
>  addtask setup_mounts after do_build
> 

NACK.

I've tried that (nostamp), but that breaks the dependency due to
recurring execution of this task which every one depends upon.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2018-02-13 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 20:32 Alexander Smirnov
2018-02-13 20:49 ` Jan Kiszka [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=c874cf39-7b64-0e05-1db0-85c5256298f6@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=asmirnov@ilbers.de \
    --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