svn commit: r519284 - head/Mk

Mathieu Arnold mat at FreeBSD.org
Mon Dec 9 09:37:35 UTC 2019


On Sun, Dec 08, 2019 at 06:19:14PM +0100, Lars Engels wrote:
> On Sun, Dec 08, 2019 at 12:54:20PM +0100, Mathieu Arnold wrote:
> > On Sun, Dec 08, 2019 at 10:19:38AM +0000, Lars Engels wrote:
> > > +# Install missing dependencies from package
> > > +install-missing-packages:
> > > +	@_dirs=$$(${MISSING-DEPENDS-LIST}); \
> > > +	${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")
> > 
> > While this seems to be ok, it will fail in most cases.
> > 
> > You cannot install packages using their origin.  It will install all
> > available flavors, and in many many cases, flavors conflict with each
> > others.
> > Also, when subpackages come along, it will install all the subpackages
> > of a port.
> > 
> > You need to get the actuall package names that a port depends on, and
> > use that to run pkg install on.
> 
> Hmm, you're right.
> Is there  a way to get the actual package names?

The magic of installing the required dependencies happens in
Mk/Scripts/do-depends.sh.
If something like this had to be done, it should be hooked in there.
Keep in mind that unless you are extremly lucky (as in, it'll never
happen), the packages you will be fetching will not match the ports tree
you are using, and it will most probably not work correctly.

It is the main reason why a feature like this was never added. It will
only ever bring pain and suffering to those who use it because unless
used in an experimental and controlled setting where you build the
packages you need from your ports tree, and then use that repository to
install them, it will never give you the correct packages for your ports
tree.  And if you are doing it, well, poudriere already does all this
and I do not see a reason to try and do in in some strange other way.

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20191209/2525c865/attachment.sig>


More information about the svn-ports-head mailing list