Re: [gentoo-dev] New emul-libs.eclass
Mike Frysinger wrote: replace that with: xargs -d $'\n' aye, that looks way better. -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
On Monday 19 February 2007, Piotr Jaroszyński wrote: > If you are using regex here, why don't you use it in find? because it isnt a POSIX option -mike pgpm4PU4zcDIt.pgp Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
ALLOWED=${ALLOWED:-^${S}/etc/env.d} If you are using regex here, why don't you use it in find? find "${S}" ! -type d ! -name '*.so*' ! -regex ${ALLOWED} -print0 | xargs -0 /bin/rm -f Note that you will need to change ^${S}/etc/env.d to ^${S}/etc/env\.d.* as it needs to be a full match( btw. you are not escaping a "." in your regex ) -- Best Regards, Piotr Jaroszyński -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
On Monday 19 February 2007, Simon Stelling wrote: > Mike Frysinger wrote: > > every use of find | xargs in there should be fixed to use find -print0 | > > xargs -0 > > The second one, yes, that's fixed now. The first one, no, cause egrep > wouldn't like it. The xargs -d' > ' ensures that \n instead of a simple space is used as delimiter. If > some package really installs files with a newline character in its name, > well, then that package is just not worth including in emul-packages. i'd point out that grep does have an option for dealing with NUL delimited data (-z), but that isnt POSIX so the bsd guys would prob complain :P that said, the syntax you're using is ugly: xargs -d' ' replace that with: xargs -d $'\n' -mike pgpbFF7U3vpij.pgp Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
Mike Frysinger wrote: every use of find | xargs in there should be fixed to use find -print0 | xargs -0 The second one, yes, that's fixed now. The first one, no, cause egrep wouldn't like it. The xargs -d' ' ensures that \n instead of a simple space is used as delimiter. If some package really installs files with a newline character in its name, well, then that package is just not worth including in emul-packages. -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
Simon Stelling wrote: > > ECLASS="emul-libs" > Not needed any more: [EMAIL PROTECTED] ~ $ grep ECLASS= /usr/portage/eclass/* /usr/portage/eclass/ccc.eclass:#DEBUG_CCC_ECLASS=1 /usr/portage/eclass/xemacs-packages.eclass:ECLASS="xemacs-packages" /usr/portage/eclass/x-modular.eclass:FONT_ECLASS="" /usr/portage/eclass/x-modular.eclass: FONT_ECLASS="font" Regards, Petteri signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New emul-libs.eclass
Fabian Groffen wrote: I'll use cp -pPr. Actually -dpPR, which is what -a is an alias for. Yes, but -d is a GNU option, and BSD people are after the POSIX only options, hence the -pPR. :) Missed that, Flameeyes just told me about it, so the -d will be dropped again ;) -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
On Monday 19 February 2007, Simon Stelling wrote: > Thanks for any feedback, every use of find | xargs in there should be fixed to use find -print0 | xargs -0 -mike pgpGdDjhf8ch3.pgp Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
On 19-02-2007 18:12:42 +0100, Simon Stelling wrote: > Simon Stelling wrote: > >I'll use cp -pPr. > > Actually -dpPR, which is what -a is an alias for. Yes, but -d is a GNU option, and BSD people are after the POSIX only options, hence the -pPR. :) -- Fabian Groffen Gentoo on a different level -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
On Mon, 19 Feb 2007 18:03:36 +0100 Simon Stelling <[EMAIL PROTECTED]> wrote: | Timothy Redaelli wrote: | >># remove void directories | >>find "${S}" -depth -type d | xargs rmdir 2&>/dev/null | > | > Portage should remove blank dirs or am i wrong? | | Yes, but only in the unmerge phase it seems, so you it installs them, | then checks whether they are empty and removes them again, which is | both stupid and confusing. Not entirely... Think cases where directories in IMAGE are being merged over non-directories in ROOT. -- Ciaran McCreesh Mail: ciaranm at ciaranm.org Web : http://ciaranm.org/ Paludis, the secure package manager : http://paludis.pioto.org/ signature.asc Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
Simon Stelling wrote: I'll use cp -pPr. Actually -dpPR, which is what -a is an alias for. -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
Timothy Redaelli wrote: # remove void directories find "${S}" -depth -type d | xargs rmdir 2&>/dev/null Portage should remove blank dirs or am i wrong? Yes, but only in the unmerge phase it seems, so you it installs them, then checks whether they are empty and removes them again, which is both stupid and confusing. cp -a "${S}"/* "${D}"/ || die "copying files failed!" For future *BSD compatibility (yes i want to use the linux bsd emulation for flash, opera, etc) it's better to use rsync -a imho I'll use cp -pPr. -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
On Mon, 19 Feb 2007 17:05:01 +0100 Timothy Redaelli <[EMAIL PROTECTED]> wrote: | Mike Frysinger wrote: | > On Monday 19 February 2007, Fabian Groffen wrote: | >> On 19-02-2007 14:14:18 +0100, Timothy Redaelli wrote: | cp -a "${S}"/* "${D}"/ || die "copying files failed!" | >>> For future *BSD compatibility (yes i want to use the linux bsd | >>> emulation for flash, opera, etc) it's better to use rsync -a imho | >> For my understanding, what's wrong with cp -pPR? | > | > nothing ... that should be used rather than `rsync -a` which should | > never be found in an ebuild/eclass | | cp -pPR does not copy hardlinks iirc, btw i don't think we need it so | it can work :P Neither does your package manager. Nor, probably, should it, given how few filesystems allow hardlinks... -- Ciaran McCreesh Mail: ciaranm at ciaranm.org Web : http://ciaranm.org/ Paludis, the secure package manager : http://paludis.pioto.org/ signature.asc Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
Mike Frysinger wrote: > On Monday 19 February 2007, Fabian Groffen wrote: >> On 19-02-2007 14:14:18 +0100, Timothy Redaelli wrote: cp -a "${S}"/* "${D}"/ || die "copying files failed!" >>> For future *BSD compatibility (yes i want to use the linux bsd emulation >>> for flash, opera, etc) it's better to use rsync -a imho >> For my understanding, what's wrong with cp -pPR? > > nothing ... that should be used rather than `rsync -a` which should never be > found in an ebuild/eclass cp -pPR does not copy hardlinks iirc, btw i don't think we need it so it can work :P -- Timothy `Drizzt` Redaelli - http://dev.gentoo.org/~drizzt/ FreeSBIE Developer, Gentoo Developer, GUFI Staff There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. -- Jeremy S. Anderson signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] New emul-libs.eclass
On Monday 19 February 2007, Fabian Groffen wrote: > On 19-02-2007 14:14:18 +0100, Timothy Redaelli wrote: > > > cp -a "${S}"/* "${D}"/ || die "copying files failed!" > > > > For future *BSD compatibility (yes i want to use the linux bsd emulation > > for flash, opera, etc) it's better to use rsync -a imho > > For my understanding, what's wrong with cp -pPR? nothing ... that should be used rather than `rsync -a` which should never be found in an ebuild/eclass -mike pgpOGGWoGXZXi.pgp Description: PGP signature
Re: [gentoo-dev] New emul-libs.eclass
On 19-02-2007 14:14:18 +0100, Timothy Redaelli wrote: > > cp -a "${S}"/* "${D}"/ || die "copying files failed!" > > For future *BSD compatibility (yes i want to use the linux bsd emulation > for flash, opera, etc) it's better to use rsync -a imho For my understanding, what's wrong with cp -pPR? -- Fabian Groffen Gentoo on a different level -- gentoo-dev@gentoo.org mailing list
Re: [gentoo-dev] New emul-libs.eclass
Simon Stelling wrote: > Hi all, > > I recently worked on the app-emulation/emul-linux-x86-* packages and > used almost identical code snipplets in them, so I realized I might as > well put together an eclass and drop the duplication. The eclass would > provide a common template for the following packages: [cut] > # remove void directories > find "${S}" -depth -type d | xargs rmdir 2&>/dev/null Portage should remove blank dirs or am i wrong? > cp -a "${S}"/* "${D}"/ || die "copying files failed!" For future *BSD compatibility (yes i want to use the linux bsd emulation for flash, opera, etc) it's better to use rsync -a imho -- Timothy `Drizzt` Redaelli - http://dev.gentoo.org/~drizzt/ FreeSBIE Developer, Gentoo Developer, GUFI Staff There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. -- Jeremy S. Anderson signature.asc Description: OpenPGP digital signature
[gentoo-dev] New emul-libs.eclass
Hi all, I recently worked on the app-emulation/emul-linux-x86-* packages and used almost identical code snipplets in them, so I realized I might as well put together an eclass and drop the duplication. The eclass would provide a common template for the following packages: app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-compat app-emulation/emul-linux-x86-gtklibs app-emulation/emul-linux-x86-medialibs app-emulation/emul-linux-x86-qtlibs app-emulation/emul-linux-x86-sdl app-emulation/emul-linux-x86-soundlibs app-emulation/emul-linux-x86-xlibs Thanks for any feedback, -- Kind Regards, Simon Stelling Gentoo/AMD64 developer # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # # Original Author: Simon Stelling <[EMAIL PROTECTED]> # Purpose: Providing a template for the app-emulation/emul-linux-* packages # ECLASS="emul-libs" EXPORT_FUNCTIONS src_unpack src_install DESCRIPTION="Provides precompiled 32bit libraries" HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"; RESTRICT="nostrip" S=${WORKDIR} SLOT="0" IUSE="" DEPEND="" emul-libs_src_unpack() { einfo "Note: You can safely ignore the 'trailing garbage after EOF'" einfo " warnings below" unpack ${A} cd "${S}" ALLOWED=${ALLOWED:-^${S}/etc/env.d} find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d ' ' rm -f || die 'failed to remove everything but *.so*' } emul-libs_src_install() { for dir in etc/env.d etc/revdep-rebuild ; do if [[ -d "${S}"/${dir} ]] ; then for f in "${S}"/${dir}/* ; do mv -f "$f"{,-emul} done fi done # remove void directories find "${S}" -depth -type d | xargs rmdir 2&>/dev/null cp -a "${S}"/* "${D}"/ || die "copying files failed!" }