Package fallback

Hello,

Does FreeBSD have a feature similar to the OpenBSD default functionality where if the package exists in /usr/ports/packages/All/ then it is simply installed when the user runs make install on the corresponding port rather than compiling the actual port.

I think this is an excellent feature and guards me from needlessly recompiling a port where a perfectly good package is already available in a folder next to it.

Is there something I can add in my mk.conf to enable this?

Best Regards
 
How does the system know that the options set in the package correspond to those currently set in the port?

AFAIK, no, this capability isn't currently present in FreeBSD. Doesn't seem hard to add, except for that options thing.
 
wblock said:
How does the system know that the options set in the package correspond to those currently set in the port?

On FreeBSD I tend to always use -DBATCH to make it more automated so this wouldn't be an issue for me personally.
As for a solution to it. I didn't notice that OpenBSD asked any options throughout the whole procedure so perhaps it only asks for stuff on the selected port rather than its recursive dependencies.

It is interesting because packages for build dependencies and their build dependencies etc... are also installed when done this way.
 
If you use portinstall you would supply the -P option that will cause it to look for a package - first locally then remotely - and if it doesn't find and download the source.

OpenBSD philosophy is to always use a package even when using make install it builds a package then installs the package.

I think this could be mimic this by using
Code:
portinstall -pP
 
Back
Top