From owner-freebsd-ports@FreeBSD.ORG Mon Jan 30 10:45:40 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9832D16A420; Mon, 30 Jan 2006 10:45:40 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEB6543D45; Mon, 30 Jan 2006 10:45:39 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id k0UAjcXp006860; Mon, 30 Jan 2006 12:45:38 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ip.net.ua [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 28317-01-2; Mon, 30 Jan 2006 12:45:28 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id k0UAYkUc006580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Jan 2006 12:34:46 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id k0UAYltq072690; Mon, 30 Jan 2006 12:34:47 +0200 (EET) (envelope-from ru) Date: Mon, 30 Jan 2006 12:34:47 +0200 From: Ruslan Ermilov To: Alexander Leidinger Message-ID: <20060130103447.GG83362@ip.net.ua> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="df+09Je9rNq3P+GE" Content-Disposition: inline In-Reply-To: <20060130111122.ve8nfx72808gogok@netchild.homeip.net> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: Jean-Yves Lefort , 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]) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 10:45:40 -0000 --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 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--