* [gentoo-dev] New eclass: emul-linux-x86.eclass
@ 2007-11-14 8:17 Mike Doty
2007-11-14 10:31 ` Torsten Rehn
0 siblings, 1 reply; 10+ messages in thread
From: Mike Doty @ 2007-11-14 8:17 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A near identical copy of emul-libs.eclass, was done for a clean split
from the old emul systems.
I don't receive mail from this list, so CC me if you want me to see your
reply.
- --
=======================================================
Mike Doty kingtaco -at- gentoo.org
Gentoo Infrastructure
Gentoo/AMD64 Strategic Lead
GPG: E1A5 1C9C 93FE F430 C1D6 F2AF 806B A2E4 19F4 AE05
=======================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iQCVAwUBRzqvM4BrouQZ9K4FAQJ6pQP+ICZKPFemi75VF1CGo4lRE3WAsNaSTFph
ViWxutZAmq17C78IqqDuCIjq1MCa9PZNrF8qE64yWHhk/TESE6JwfDxybmlHJmZD
hvE4/ARvIqubb+8MDEEb3/6HPkXukNccAcI5SM+ytwX5hwKKTn6AkVk3MQV/mjDn
DJ4y5KD5LGU=
=lEtN
-----END PGP SIGNATURE-----
[-- Attachment #2: emul-linux-x86.eclass --]
[-- Type: text/plain, Size: 1237 bytes --]
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.1 2007/11/14 03:42:12 kingtaco Exp $
#
# Original Author: Mike Doty <kingtaco@gentoo.org>
# Adapted from emul-libs.eclass
# Purpose: Providing a template for the app-emulation/emul-linux-* packages
#
EXPORT_FUNCTIONS src_unpack src_install
SRC_URI="mirror://gentoo/${PN}-${PVR}.tar.bz2"
DESCRIPTION="Provides precompiled 32bit libraries"
HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
RESTRICT="strip"
S=${WORKDIR}
SLOT="0"
IUSE=""
DEPEND=">=sys-apps/findutils-4.2.26"
RDEPEND=""
emul-linux-x86_src_unpack() {
unpack ${A}
cd "${S}"
ALLOWED=${ALLOWED:-^${S}/etc/env.d}
find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
}
emul-linux-x86_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 -print0 | xargs -0 rmdir 2&>/dev/null
cp -pPR "${S}"/* "${D}"/ || die "copying files failed!"
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 8:17 [gentoo-dev] New eclass: emul-linux-x86.eclass Mike Doty
@ 2007-11-14 10:31 ` Torsten Rehn
2007-11-14 11:59 ` Piotr Jaroszyński
0 siblings, 1 reply; 10+ messages in thread
From: Torsten Rehn @ 2007-11-14 10:31 UTC (permalink / raw
To: gentoo-dev; +Cc: kingtaco
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
On Wednesday 14 November 2007, Mike Doty wrote:
> S=${WORKDIR}
Shouldn't ${WORKDIR} be quoted here, too?
Kind regards
--
Torsten Rehn <scel@xdap.org>
Gentoo AMD64 Arch Tester
http://scel.info
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 10:31 ` Torsten Rehn
@ 2007-11-14 11:59 ` Piotr Jaroszyński
2007-11-14 13:21 ` Marijn Schouten (hkBst)
0 siblings, 1 reply; 10+ messages in thread
From: Piotr Jaroszyński @ 2007-11-14 11:59 UTC (permalink / raw
To: gentoo-dev; +Cc: Torsten Rehn, kingtaco
On Wednesday 14 of November 2007 11:31:13 Torsten Rehn wrote:
> On Wednesday 14 November 2007, Mike Doty wrote:
> > S=${WORKDIR}
>
> Shouldn't ${WORKDIR} be quoted here, too?
No need to quote in assignments.
--
Best Regards,
Piotr Jaroszyński
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 11:59 ` Piotr Jaroszyński
@ 2007-11-14 13:21 ` Marijn Schouten (hkBst)
2007-11-14 13:53 ` Torsten Rehn
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-11-14 13:21 UTC (permalink / raw
To: gentoo-dev; +Cc: Torsten Rehn, kingtaco
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Piotr Jaroszyński wrote:
> On Wednesday 14 of November 2007 11:31:13 Torsten Rehn wrote:
>> On Wednesday 14 November 2007, Mike Doty wrote:
>>> S=${WORKDIR}
>> Shouldn't ${WORKDIR} be quoted here, too?
>
> No need to quote in assignments.
But why is it standard to quote other assignments like in DESCRIPTION and
HOMEPAGE then?
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHOvZ2p/VmCx0OL2wRAtqZAJ9xUyUsTOF8OZEeAjZ5JMwksqpDigCeLCLG
veWYwxkBPTb5aAidxFxBIx4=
=09PE
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 13:21 ` Marijn Schouten (hkBst)
@ 2007-11-14 13:53 ` Torsten Rehn
2007-11-14 14:10 ` Ferris McCormick
2007-11-14 13:54 ` [gentoo-dev] " Vladimir Rusinov
[not found] ` <200711141449.09228.scel@xdap.org>
2 siblings, 1 reply; 10+ messages in thread
From: Torsten Rehn @ 2007-11-14 13:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
On Wednesday 14 November 2007 14:21, you wrote:
> But why is it standard to quote other assignments like in DESCRIPTION and
> HOMEPAGE then?
When assigning literal values as in DESCRIPTION and HOMEPAGE, you have to
quote. ${WORKDIR} is quoted on its assignment and therefore does not have to
be quoted when assigning its value to another variable (${S}) by reference.
[gentop][scel@~] > cat test.sh
#!/bin/bash
TEXT="A B"
Q=${TEXT}
echo ${TEXT}
FAIL=DONT TRYTHISATHOME
[gentop][scel@~] > ./test.sh
A B
./test.sh: line 5: TRYTHISATHOME: command not found
--
Torsten Rehn <scel@xdap.org>
Gentoo AMD64 Arch Tester
http://scel.info
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 13:21 ` Marijn Schouten (hkBst)
2007-11-14 13:53 ` Torsten Rehn
@ 2007-11-14 13:54 ` Vladimir Rusinov
[not found] ` <200711141449.09228.scel@xdap.org>
2 siblings, 0 replies; 10+ messages in thread
From: Vladimir Rusinov @ 2007-11-14 13:54 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
On 11/14/07, Marijn Schouten (hkBst) <hkBst@gentoo.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> But why is it standard to quote other assignments like in DESCRIPTION and
> HOMEPAGE then?
Probably because WORKDIR would be quoted where it is being used:
...
if [[ -d "${S}"/${dir} ]] ; then
...
and so on.
--
Vladimir Rusinov
GreenMice Solutions: IT-решения на базе Linux
http://greenmice.info/
[-- Attachment #2: Type: text/html, Size: 782 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 13:53 ` Torsten Rehn
@ 2007-11-14 14:10 ` Ferris McCormick
2007-11-14 14:25 ` Torsten Rehn
2007-11-14 15:11 ` [gentoo-dev] " Ryan Hill
0 siblings, 2 replies; 10+ messages in thread
From: Ferris McCormick @ 2007-11-14 14:10 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]
On Wed, 2007-11-14 at 14:53 +0100, Torsten Rehn wrote:
> On Wednesday 14 November 2007 14:21, you wrote:
> > But why is it standard to quote other assignments like in DESCRIPTION and
> > HOMEPAGE then?
>
> When assigning literal values as in DESCRIPTION and HOMEPAGE, you have to
> quote. ${WORKDIR} is quoted on its assignment and therefore does not have to
> be quoted when assigning its value to another variable (${S}) by reference.
>
Note, however, that for example in /usr/lib/portage/bin/ebuild.sh, it's
always quoted (except once, which looks like an oversight). Example:
ebuild.sh:1081: if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ];
then
or
ebuild.sh:1090: cd "${WORKDIR}"
(The line that looks like an oversight is:
ebuild.sh:1019: if [[ ${PORTAGE_BUILDDIR}/.compiled -nt ${WORKDIR} ]] ;
then
)
> [gentop][scel@~] > cat test.sh
> #!/bin/bash
> TEXT="A B"
> Q=${TEXT}
> echo ${TEXT}
> FAIL=DONT TRYTHISATHOME
> [gentop][scel@~] > ./test.sh
> A B
> ./test.sh: line 5: TRYTHISATHOME: command not found
--
Ferris McCormick (P44646, MI) <fmccor@gentoo.org>
Developer, Gentoo Linux (Devrel, Sparc)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
2007-11-14 14:10 ` Ferris McCormick
@ 2007-11-14 14:25 ` Torsten Rehn
2007-11-14 15:11 ` [gentoo-dev] " Ryan Hill
1 sibling, 0 replies; 10+ messages in thread
From: Torsten Rehn @ 2007-11-14 14:25 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
On Wednesday 14 November 2007, Ferris McCormick wrote:
> Note, however, that for example in /usr/lib/portage/bin/ebuild.sh, it's
> always quoted (except once, which looks like an oversight).
I was talking about referencing variables when declaring other variables.
Whenever you actually use a variable in-line (e.g. as a parameter to a
command), you have to quote as well of course.
i.e.
A=${B}
and not
cd ${B}
The difference is that bash handles variable assignments all interally and is
smart enough to handle ${B} properly, while vars that are passed to some
command are just evaluated and passed to the command in question and cannot
be "protected" anymore by bash. AFAIK.
--
Torsten Rehn <scel@xdap.org>
Gentoo AMD64 Arch Tester
http://scel.info
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-dev] Re: New eclass: emul-linux-x86.eclass
2007-11-14 14:10 ` Ferris McCormick
2007-11-14 14:25 ` Torsten Rehn
@ 2007-11-14 15:11 ` Ryan Hill
1 sibling, 0 replies; 10+ messages in thread
From: Ryan Hill @ 2007-11-14 15:11 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
Ferris McCormick wrote:
> (The line that looks like an oversight is:
>
> ebuild.sh:1019: if [[ ${PORTAGE_BUILDDIR}/.compiled -nt ${WORKDIR} ]] ;
> then
> )
you don't need to quotes when referencing variables inside [[ double
brackets ]], but you do in [ single brackets ]. confused yet? ;)
--
looks like christmas at fifty-five degrees
this latitude weakens my knees
EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662 (0xF9A40662)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
[not found] ` <200711141449.09228.scel@xdap.org>
@ 2007-11-14 17:01 ` Mike Doty
0 siblings, 0 replies; 10+ messages in thread
From: Mike Doty @ 2007-11-14 17:01 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Torsten Rehn wrote:
> On Wednesday 14 November 2007 14:21, you wrote:
>> But why is it standard to quote other assignments like in DESCRIPTION and
>> HOMEPAGE then?
>
> When assigning literal values as in DESCRIPTION and HOMEPAGE, you have to
> quote. ${WORKDIR} is quoted on its assignment and therefore does not have to
> be quoted when assigning its value to another variable (${S}) by reference.
>
> [gentop][scel@~] > cat test.sh
> #!/bin/bash
> TEXT="A B"
> Q=${TEXT}
> echo ${TEXT}
> FAIL=DONT TRYTHISATHOME
> [gentop][scel@~] > ./test.sh
> A B
> ./test.sh: line 5: TRYTHISATHOME: command not found
>
I've quoted WORKDIR.
- --
=======================================================
Mike Doty kingtaco -at- gentoo.org
Gentoo Infrastructure
Gentoo/AMD64 Strategic Lead
GPG: E1A5 1C9C 93FE F430 C1D6 F2AF 806B A2E4 19F4 AE05
=======================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iQCVAwUBRzsp0YBrouQZ9K4FAQIu6gQAhtpbkyViwi/zgWa6fgLvG0IfyaZSzeXO
YovtcSJpUTtW1IyfOEbrYWnY2Apyv5V2kp7E8szXNF+k3sAQt05N5i8VBjhZAFJP
HUWqVr7CxdAloYUPnWGTlXzWQWpc+6EWzqIGMAxk61VFnmvcWY5tSZSerUdS1ftS
ymyM0fmsDfk=
=4Abs
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-11-14 17:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 8:17 [gentoo-dev] New eclass: emul-linux-x86.eclass Mike Doty
2007-11-14 10:31 ` Torsten Rehn
2007-11-14 11:59 ` Piotr Jaroszyński
2007-11-14 13:21 ` Marijn Schouten (hkBst)
2007-11-14 13:53 ` Torsten Rehn
2007-11-14 14:10 ` Ferris McCormick
2007-11-14 14:25 ` Torsten Rehn
2007-11-14 15:11 ` [gentoo-dev] " Ryan Hill
2007-11-14 13:54 ` [gentoo-dev] " Vladimir Rusinov
[not found] ` <200711141449.09228.scel@xdap.org>
2007-11-14 17:01 ` Mike Doty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox