From: Torsten Veller <ml-en@veller.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: perl-module.eclass -- review - 2
Date: Mon, 2 Mar 2009 08:24:35 +0100 [thread overview]
Message-ID: <20090302053455.TA31dba.tv@veller.net> (raw)
In-Reply-To: <20090302033455.GC1955@comet>
* Donnie Berkholz <dberkholz@gentoo.org>:
Thanks for your comments.
> On 12:28 Sat 28 Feb , Torsten Veller wrote:
> > case "${EAPI:-0}" in
> > 0|1)
> > EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test src_unpack
> > ;;
> > *)
> > EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install
> > ;;
> > esac
>
> Maybe this is just me, but I prefer to reserve '*' cases for the
> fallback when I don't understand what I'm given.
As this is a general problem we should move it out of this thread.
I also think this should have been discussed months ago.
> > 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?
http://www.opengroup.org/onlinepubs/000095399/utilities/find.html
The brackets are no problem.
But -mindepth and -delete are not in the specs:
| The -mindepth and -maxdepth options are GNU extensions that should be
| avoided if possible. (from devmanual.g.o)
Well, even the portage ebuild uses -mindepth. So should I replace it?
| The `-delete' action was introduced by the BSD family of operating
| systems (from `info find`)
and is also used several times in the tree.
> > find "${D}" -type f -not -name '*.so' | while read f ; do
> > if file "${f}" | grep -q -i " text" ; then
> > if grep -q "${D}" "${f}" ; then ewarn "QA: File contains a temporary path ${f}" ; fi
> > sed -i -e "s:${D}:/:g" "${f}" || die
>
> Could you just use dosed here?
I guess you mean the default expression?
dosed defaults to "s:${D}::g"
$D is supposed to end with a trailing slash.
-> is the path still absolute?
Strange at least.
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.
Is there still a problem in the snippet above and is the following better
(if we assume that packages contain files with sane names)?
pushd "${D}" > /dev/null
for f in $(find . -type f -not -name '*.so' ) ; do
if file "${f}" | grep -q -i " text" ; then
sed -i -e "s:${D}:/:g" "${f}" || die
fi
done
popd > /dev/null
Maybe i need some coffee.
next prev parent reply other threads:[~2009-03-02 7:25 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 [this message]
2009-03-02 12:01 ` Bo Ørsted Andresen
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=20090302053455.TA31dba.tv@veller.net \
--to=ml-en@veller.net \
--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