Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2006 09:35:22 +0400
From:      "Andrew Pantyukhin" <infofarmer@FreeBSD.org>
To:        "LI Xin" <delphij@delphij.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Proper way to detect build-time configuration if all files are under the same name?
Message-ID:  <cb5206420609232235t3b89b98ev5960aeed198586b1@mail.gmail.com>
In-Reply-To: <45157308.5020600@delphij.net>
References:  <45157308.5020600@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/23/06, LI Xin <delphij@delphij.net> wrote:
> Hi,
>
> In ports/102613, the submitter has pointed out a problem that the build
> infrastructure can not detect the present OpenLDAP configuration at
> build time, and thus causing dependency problem when being rebuilt.
> This occurs on some other ports as well.
>
> Is it possible to make the package registration stage to detect actual
> port name that has installed the specified dependency file?  Or is there
> any way to solve the problem?
>
> Long version:
>
> Say, we have a file, called "${PREFIX}/foo/bar" installed by a port
> foo-1.0.  Another port, say, foo-feature-1.0, also installs that file.
> In the dependency of third port, say, bar-1.0, we define:
>
> RUN_DEPENDS=    ${PREFIX}/foo/bar:${PORTSDIR}/net/foo
>
> then the ports infrastructure would consider net/foo as dependency,
> regardless whether foo or foo-feature is acutaly installed.
>
> Of course it is possible to install a file with the name
> ${PREFIX}/foo/bar-feature but I think that's too dirty a hack...

You can detect foo vs foo-feature by various methods, from
different plists to querying /var/db/pkg, but (1) that's hacky
and (2) it will only work at package-building stage, not at
pkg_add one.

A solution is being sought. Debian has virtual packages,
I'll have a bit about it in my (slowly) upcoming paper. If
I find a better way, I'll talk about it, too.



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