tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: removing useless dependencies



On Fri, Jul 10, 2015 at 03:32:45PM +0200, Edgar Fuß wrote:
> > No. Let's pick a nice example to illustrate the problem:
> This looks very strange and severly broken.
> 
> > On the other hand:
> > 
> > DEPENDS+= {perl>=5.8.4,p5-MIME-Base64>=3.01}:../../converters/p5-MIME-Base64
> > 
> > Let's say we have perl-5.22.0 and p5-MIME-Base64-3.15nb1 at hand. By
> > itself, this will install perl-5.22.0 as it has the higher version
> > number.
> How does the logic deciding this know
> -- what version of perl is "at hand"
> -- how to install perl
> given there's no hint in the dependency line where that "perl" package is 
> located?
> Is there some magic hard-coded into the dependency logic making your example 
> different from
> 	DEPENDS+= {foo>=47.11,bar>=0.8.15}:../../local/bar
> which certainly can't know how to install the "foo" package?

There are two different cases to consider: installation of binary
packages and builds from source. For the former, pkg_add will check each
dependency in order and see if it is matched by an installed package. If
no match exists, it scans the element of PKGPATH for matches. If there
is more than one match, the best match is picked. This is defined as the
package with the largest version.

For builds from source, a match with an installed package is tried
first. If bin-install is used, pkg_add is run next. If that still fails,
the build recurses into the given directory.

Joerg


Home | Main Index | Thread Index | Old Index