All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] infra: fix autotools .la fixing when no .la files are present
Date: Sun, 06 Jul 2014 16:59:51 +0200	[thread overview]
Message-ID: <5603c98c-69ac-403d-bf91-48cf0cdee841@email.android.com> (raw)
In-Reply-To: <20140706144147.GB3684@free.fr>

"Yann E. MORIN" <yann.morin.1998@free.fr> schreef:
>Thomas, All,
>
>On 2014-07-06 16:23 +0200, Thomas De Schampheleire spake thusly:
>> Commit 6f638ea9c9c7bacc646430a74ad3dd2740eae676 ("infra: /usr support:
>> STAGING_DIR can be outside BASE_DIR") changed a for-construct around 'sed
>> -i' in a 'find | xargs sed -i'. However, if the find returns no results,
>> sed complains with:
>>     '/bin/sed: no input files'
>> 
>> Since a for construct is not very nice to handle this case, this commit
>> changes the 'find | xargs sed -i' into 'find -exec sed -i'.
>
>Why not use: 'xargs -r' instead?
>
>    --no-run-if-empty
>    -r     If the standard input does not contain any nonblanks, do
>           not run the command.  Normally, the command is run once
>           even if there is no input. This option is a GNU extension.
>
>Using 'find -exec' is OK, but it spawns a process for each result. I
>doubt we end up in a case with trillions of results, so the overhead
>should not be noticeable.

Aha, I didn't know this option. I did know about the overhead difference, but at least the -exec should be on par with the for loop.

I'll resubmit with this -r instead, thanks!

Best regards,
Thomas

      reply	other threads:[~2014-07-06 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-06 14:23 [Buildroot] [PATCH] infra: fix autotools .la fixing when no .la files are present Thomas De Schampheleire
2014-07-06 14:41 ` Yann E. MORIN
2014-07-06 14:59   ` Thomas De Schampheleire [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=5603c98c-69ac-403d-bf91-48cf0cdee841@email.android.com \
    --to=patrickdepinguin@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.