Subject: Re: depends with wildcards in pkg_*
To: None <hubertf@netbsd.org>
From: Alistair Crooks <azcb0@amdahl.com>
List: tech-pkg
Date: 09/08/1998 09:40:54
Hubert,
> [I do *not* talk about bsd.pkg.mk here!]
>
> Currently, if a pkg has some dependency with a wildcard in it (foo-*,
> bar>=97, ...), this fails to automatically install this package from
> pkg_add, as the name of the depending package is taken verbatime to create
> a filename that's handled to pkg_add then.
Actually, currently, there are no DEPENDS or CONFLICTS with wildcards
in them. We do plan to change this in the future.
> To improve this, pkg_add needs to look for a (binary!) package matching
> the requested dependency, and then install it.
>
> Issues here:
> 1. it should make a "best" match, chosing the binary package to be as
> current as possible (i.e. the highest version available)
> 2. the implementation for "local" packages (i.e. on local storage) would
> be to not use "base/package" but scan "base" for a binary package
> matching the given wildcard best (see above), and using that one then.
> 3. When installing via an ftp://-link, I dont' really see a possibility
> here to do the same, until someone comes up with some
> opendir()/readdir() workalike for FTP. Any suggestions here?
>
> Is there something missing? Suggestions?
Yes - there are two separate things here:
(a) a binary package on the localhost which can be used, as specified
in a DEPENDS+= lesstif>=0.85.2 type of way, and
(b) a binary package which should be fetched, if the DEPENDS+=
lesstif>=0.85.2 type of matching in (a) above fails - at the moment,
bsd.pkg.mk will go into the relevant directory at "make package" time,
and grab the version number and place that in the @pkgdep field of the
+CONTENTS file in the mozilla (or whatever) package.
Now, personally, I believe we should combine the two, and record both
in the +CONTENTS file, probably by using an extra @pkgmatch directive
for (a). This will be done automatically at "make package" time.
Please note that this is completely separate from the +REQUIRED_BY
file, which is a list of currently-installed packages on the
localhost, and should never include any wildcards or dewey relational
matching.
Regards,
Alistair