Flaw in print/acroread7 (was: Re: [ru@FreeBSD.org: [patch]
mixed i386/amd64 ports semi-broken])
Ruslan Ermilov
ru at FreeBSD.org
Mon Jan 30 02:45:40 PST 2006
On Mon, Jan 30, 2006 at 11:11:22AM +0100, Alexander Leidinger wrote:
> Jean-Yves Lefort <jylefort at FreeBSD.org> wrote:
>
> >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.
>
> Ruslan said that removing the bsd.port.mk code in question solves the
> 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.
>
No, it doesn't mean that. My patch makes the following code to work
in emulators/linux_base-8:
.if (${ARCH} == "amd64")
LATEST_LINK:= ${LATEST_LINK:C/linux/linux32/}
ARCH= i386
.endif
What's happening here is that ARCH is set to "amd64" in acroread7
and ARCH=amd64 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= i386
:
: all:
: @echo ${ARCH}
Then run it as "make ARCH=amd64" to see what I'm talking about.
> Note: This implies that port A is able to decide upon the content of ARCH
> 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.
>
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,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060130/ae8641af/attachment.bin
More information about the freebsd-ports
mailing list