From: "Bo Ørsted Andresen" <bo.andresen@zlin.dk>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: perl-module.eclass -- review - 2
Date: Mon, 2 Mar 2009 13:01:41 +0100 [thread overview]
Message-ID: <200903021301.43298.bo.andresen@zlin.dk> (raw)
In-Reply-To: <20090302053455.TA31dba.tv@veller.net>
On Monday 02 March 2009 08:24:35 Torsten Veller wrote:
> > > find "${D}/${VENDOR_LIB}" -type f -a \( -name .packlist \
> > > -o \( -name '*.bs' -a -empty \) \) -delete
> > > find "${D}/${VENDOR_LIB}" -depth -mindepth 1 -type d -empty -delete
> >
> > I'm curious how portable the find () construct is. Do you know?
It was established well over a year ago that find in the ebuild environment
must be GNU find. Using portable find is not worth the pain.
[...]
> > Could you just use dosed here?
dosed needs to die.
[...]
> BTW: After I looked up the devmanual part about "find" above, I wonder:
> | find "${S}" -type f | while read f ; do
> | [...]
> | for f in $(find "${S}" -type f) ; do
> | [...]
> | Warning
> | In both cases, files with weird characters or spaces in their names may
> | cause serious problems.
The while loop breaks with leading or trailing spaces in the path. If the
spaces are anywhere else in the path it works. The for loop breaks with spaces
regardless of where they are. And you can of course come up with weird
characters that break them both.
If you really want to do better use:
find "${S}" -print0 | while read -rd '' f; do
if file "${f}" ...
done
You also really should provide proper die messages.
--
Bo Andresen
next prev parent reply other threads:[~2009-03-02 12:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 14:08 [gentoo-dev] perl-module.eclass -- review Torsten Veller
2009-02-28 11:28 ` [gentoo-dev] Re: perl-module.eclass -- review - 2 Torsten Veller
2009-03-02 3:34 ` Donnie Berkholz
2009-03-02 7:24 ` Torsten Veller
2009-03-02 12:01 ` Bo Ørsted Andresen [this message]
2009-03-03 11:13 ` Peter Volkov
2009-03-03 13:09 ` Bo Ørsted Andresen
2009-03-09 1:50 ` Donnie Berkholz
2009-03-09 8:02 ` Rémi Cardona
2009-03-02 6:56 ` [gentoo-dev] perl-module.eclass -- review Robin H. Johnson
2009-03-02 12:08 ` [gentoo-dev] " Torsten Veller
2009-03-02 17:51 ` Donnie Berkholz
2009-03-02 18:13 ` Robin H. Johnson
2009-03-05 14:47 ` [gentoo-dev] Re: perl-module.eclass -- review - 3 Torsten Veller
2009-03-02 18:10 ` [gentoo-dev] Re: perl-module.eclass -- review Robin H. Johnson
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=200903021301.43298.bo.andresen@zlin.dk \
--to=bo.andresen@zlin.dk \
--cc=gentoo-dev@lists.gentoo.org \
/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