Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2007 23:01:38 -0500
From:      "Matthew D. Fuller" <fullermd@over-yonder.net>
To:        Yoshihiro Ota <ota@j.email.ne.jp>
Cc:        Garrett Cooper <youshi10@u.washington.edu>, freebsd-ports@freebsd.org
Subject:   Re: Call for testers for yet another ports upgrade program, ports+
Message-ID:  <20070801040138.GA21345@over-yonder.net>
In-Reply-To: <20070731234603.ffda3331.ota@j.email.ne.jp>
References:  <20070726011654.cec378be.ota@j.email.ne.jp> <46A866BE.1000407@u.washington.edu> <20070726233610.e536c2e2.ota@j.email.ne.jp> <46A9B112.7040408@u.washington.edu> <20070727214847.6708a918.ota@j.email.ne.jp> <20070728155935.GT21345@over-yonder.net> <20070728221428.8539106d.ota@j.email.ne.jp> <20070729073530.GA57843@over-yonder.net> <20070731234603.ffda3331.ota@j.email.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 31, 2007 at 11:46:03PM -0400 I heard the voice of
Yoshihiro Ota, and lo! it spake thus:
> 
> 1. Is this about RUN_DEPENDS in makefiles?

Yes, but conditional.

For instance, see audio/teknap:

.if ${HAVE_GNOME:Mgtk12}!=""
USE_GNOME+= gtk12
CONFIGURE_ARGS+=--with-gtk
PKGNAMESUFFIX=  -gtk
.else
CONFIGURE_ARGS+=--without-gtk
.endif

If you don't have gtk12 installed, and you start building a bunch of
stuff (including teknap), and evaluate the dependancies at the start
of the process, teknap won't depend on gtk12.  If, however, gtk12 gets
installed sometime during the process before teknap, the teknap build
will then depend on gtk12.  pkg_* will get that right of course,
because the _DEPENDS parsing is all handled at that time as far as the
port is concerned.

But, if your tool calculates the dependancies and caches them at the
BEGINNING of the process, before gtk12 got installed by
somethingorother else, you won't have it in your list.  You can only
get the right view of the dependancies of a port you're
building/installing at the time you build/install it; if you evaluate
them, then build/install anything else, you potentially invalidate
that cached information.

There could also be more intricate cases, whereby instead of the mere
presence triggering a feature/dependancy, a particular version does,
so an upgrade of one port will change the actions of another.  I don't
know of any, but it's certainly within reason.

(above example found via "cd /usr/ports ; find . -depth 3 -type f
-name 'Makefile' -print | xargs grep HAVE_GNOME", along with numerous
other examples at least some of which do similar dependancy twisting)



Of course, I may have totally misunderstood the sense of your
statements, and/or this could be a non-issue in your particular usage.
But the way I read your statement of "dependancies are static" is
false as above; installing a port, with no other user interaction, can
and does change the contents of _DEPENDS variables; if the value is
important in a given situation, it needs to be evaluated at the time
it's important.


-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.



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