public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH 1/1] isar-bootstrap-helper: fix "Argument list too long" error
Date: Tue, 11 Dec 2018 11:12:12 +0300	[thread overview]
Message-ID: <9493bb1c-f5b0-2910-4d2e-2b45b35dcb34@ilbers.de> (raw)
In-Reply-To: <20181209152140.9013-2-Cedric_Hombourger@mentor.com>

On 12/9/18 6:21 PM, Cedric Hombourger wrote:
> The mv command used to move downloaded .deb files to the apt cache will
> fail with an "Argument list too long" error when the root file-system
> includes many packages. Use 'find -execdir {} +' to call /bin/mv with
> as many packages as possible but without exceeding system limits.

Applied to the 'next',

Thanks,
Maxim.

> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>   meta/classes/isar-bootstrap-helper.bbclass | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
> index 641138a..d780b85 100644
> --- a/meta/classes/isar-bootstrap-helper.bbclass
> +++ b/meta/classes/isar-bootstrap-helper.bbclass
> @@ -145,8 +145,9 @@ setup_root_file_system() {
>       if [ ${CLEAN} ]; then
>           if [ ${KEEP_APT_CACHE} -eq 1 ]; then
>               mkdir -p ${WORKDIR}/apt_cache
> -            sudo mv $(find $ROOTFSDIR/var/cache/apt -name '*.deb') ${WORKDIR}/apt_cache
> -            sudo chown `whoami` ${WORKDIR}/apt_cache/*
> +            sudo find ${ROOTFSDIR}/var/cache/apt/archives \
> +                -maxdepth 1 -name '*.deb' -execdir /bin/mv -t ${WORKDIR}/apt_cache '{}' '+'
> +            sudo chown -R $(whoami) ${WORKDIR}/apt_cache
>           fi
>           sudo -E chroot "$ROOTFSDIR" \
>               /usr/bin/apt-get autoremove --purge --yes
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

      reply	other threads:[~2018-12-11  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-09 15:21 [PATCH 0/1] " Cedric Hombourger
2018-12-09 15:21 ` [PATCH 1/1] " Cedric Hombourger
2018-12-11  8:12   ` 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=9493bb1c-f5b0-2910-4d2e-2b45b35dcb34@ilbers.de \
    --to=mosipov@ilbers.de \
    --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