Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2006 12:34:47 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        Jean-Yves Lefort <jylefort@FreeBSD.org>, ports@FreeBSD.org, mezz@FreeBSD.org, kris@obsecurity.org
Subject:   Re: Flaw in print/acroread7 (was: Re: [ru@FreeBSD.org: [patch] mixed i386/amd64 ports semi-broken])
Message-ID:  <20060130103447.GG83362@ip.net.ua>
In-Reply-To: <20060130111122.ve8nfx72808gogok@netchild.homeip.net>
References:  <20060129221019.1c0a5d10@Magellan.Leidinger.net> <20060130040847.2ee8891f.jylefort@FreeBSD.org> <20060130031719.GA22430@xor.obsecurity.org> <20060130050239.485d2547.jylefort@FreeBSD.org> <20060130055838.GA24139@xor.obsecurity.org> <20060130071841.4aed92a2.jylefort@FreeBSD.org> <20060130065505.GA24898@xor.obsecurity.org> <20060130102337.azmqgbcstcksgo88@netchild.homeip.net> <20060130104518.09ad976a.jylefort@FreeBSD.org> <20060130111122.ve8nfx72808gogok@netchild.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--df+09Je9rNq3P+GE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 30, 2006 at 11:11:22AM +0100, Alexander Leidinger wrote:
> Jean-Yves Lefort <jylefort@FreeBSD.org> wrote:
>=20
> >It's not a bug in acroread7. It's a bug in bpm which causes ARCH to be
> >read-only in submakes, or it's a bug in the ports which try to
> >override ARCH without success since it's read-only in submakes;
> >someone should decide.
>=20
> Ruslan said that removing the bsd.port.mk code in question solves the=20
> problem
> for him. This means that if port A depends upon port B, port B is able to
> change the ARCH variable in port A. I would not expect this, and it's not
> the way the current code works. This patch appears like a can of worms to
> me.
>=20
No, it doesn't mean that.  My patch makes the following code to work
in emulators/linux_base-8:

=2Eif (${ARCH} =3D=3D "amd64")
LATEST_LINK:=3D           ${LATEST_LINK:C/linux/linux32/}
ARCH=3D                   i386
=2Eendif

What's happening here is that ARCH is set to "amd64" in acroread7
and ARCH=3Damd64 is passed as a command-line variable to a submake.
The above code resets ARCH to i386 but ${ARCH} evaluations still
see it as "amd64" because there are now two ${ARCH} variables,
global that it set to "i386" (and what we really want), and a
highestr priority command-line ${ARCH} variable that is set to
"amd64".  Got the point?

Consider this simple makefile code:

: ARCH=3D   i386
:=20
: all:
: 	@echo ${ARCH}

Then run it as "make ARCH=3Damd64" to see what I'm talking about.

> Note: This implies that port A is able to decide upon the content of ARCH=
=20
> for
> every port it depends upon. This may or may not be a can of worms too.
> Personally I don't have a strong bad feeling about this part.
>=20
You miss the point and origin of a problem.  IOW, if you try to
install emulators/linux_base-8 on amd64, it will work.  But if
you install it as a consequence of installing acroread7 for
example, when linux_base-8 is installed as a dependency and in
a submake, linux_base-8 won't build.  Try it...


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--df+09Je9rNq3P+GE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD3evGqRfpzJluFF4RAj2FAJ9K1sMy6wZNV5NgVF7o/VL/eocN9gCgi7Ct
VMpBh2a/ELE/vpKzBsJMFOk=
=4GQb
-----END PGP SIGNATURE-----

--df+09Je9rNq3P+GE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060130103447.GG83362>