public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: "ubely@ilbers.de" <ubely@ilbers.de>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Bezdeka, Florian" <florian.bezdeka@siemens.com>
Subject: Re: [PATCH 1/2] Use hardlinks in deb-dl-dir functions
Date: Fri, 30 Dec 2022 07:29:58 +0000	[thread overview]
Message-ID: <fcad222f87c64f026901801a0d2179cba1a22f8e.camel@siemens.com> (raw)
In-Reply-To: <20221230043858.15411-2-ubely@ilbers.de>

On Fri, 2022-12-30 at 05:38 +0100, Uladzimir Bely wrote:
> This saves disk space and reduces IO
> 
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
>  meta/classes/deb-dl-dir.bbclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-
> dir.bbclass
> index 3b1517dc..d846937a 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -86,7 +86,7 @@ deb_dl_dir_import() {
>          printenv | grep -q BB_VERBOSE_LOGS && set -x
>  
>          sudo find "${pc}" -type f -iname "*\.deb" -exec \
> -            cp -n --no-preserve=owner -t
> "${rootfs}"/var/cache/apt/archives/ {} +
> +            cp -l -n --no-preserve=owner -t
> "${rootfs}"/var/cache/apt/archives/ {} +
>      '

I just observed the following race condition on the cache:

| DEBUG: Python function sstate_hardcode_path finished
| DEBUG: Executing shell function rootfs_install_sstate_prepare
| tar: rootfs/var/cache/apt/archives/network-manager_1.30.6-
1+deb11u1_arm64.deb: file changed as we read it
| WARNING: exit code 1 from a shell command.
| DEBUG: Python function sstate_task_postfunc finished
| ERROR: ExecutionError('/build/tmp/work/debian-bullseye-amd64/sbuild-
chroot-target/1.0-r0/temp/run.rootfs_install_sstate_prepare.7023', 1,
None, None)
ERROR: Task (/build/../work/isar/meta/recipes-devtools/sbuild-
chroot/sbuild-chroot-target.bb:do_rootfs_install) failed with exit code
'1'

Could it be that we copied a file that had not been fully downloaded
yet?

Felix

>  }
>  
> @@ -109,7 +109,7 @@ deb_dl_dir_export() {
>              if [ -n "$package" ]; then
>                  cmp --silent "$package" "$p" && continue
>              fi
> -            sudo cp -n "${p}" "${pc}"
> +            sudo cp -l -n "${p}" "${pc}"
>          done
>          sudo chown -R $(id -u):$(id -g) "${pc}"
>      '
> -- 
> 2.20.1
> 


  reply	other threads:[~2022-12-30  7:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30  4:38 [PATCH 0/2] Improving apt cache Uladzimir Bely
2022-12-30  4:38 ` [PATCH 1/2] Use hardlinks in deb-dl-dir functions Uladzimir Bely
2022-12-30  7:29   ` Moessbauer, Felix [this message]
2022-12-30  8:29     ` Roberto A. Foglietta
2022-12-30  4:38 ` [PATCH 2/2] Clean apt cache from debootstrapped rootfs dirs Uladzimir Bely
2022-12-30  9:03   ` Roberto A. Foglietta
2023-01-02 16:27   ` Henning Schild
2023-01-02 16:33   ` Henning Schild
2023-01-03  9:01     ` Roberto A. Foglietta

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=fcad222f87c64f026901801a0d2179cba1a22f8e.camel@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /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