On Fri, May 16, 2008 at 11:47:09AM -0700, Ben Calvert wrote:
>
> On May 16, 2008, at 12:34 AM, Marc Espie wrote:
>>
>> Or even add a SRC: element to your PKG_PATH as a fallback.
>
> Marc - where is this documented?  i can't find it in pkg_add, package, or 
> friends.

It was finished fairly recently, and it's not 100% tested yet:

- it requires some cooperation between the ports tree and pkg_add: 
if you run the ports tree from pkg_add, it means you already have a lock on 
/var/db/pkg, so it requires -F nolock.

- it's also one of the reasons for stopping at the first PKG_PATH entry
that satisfies your request. SRC urls are a `last resort', when you can't
find the package and need to build it.

If you want to play with it, you can try adding an entry like:
src:/usr/ports/
at the end of your PKG_PATH
(for instance:
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/:src:/usr/ports/
and it will build locally whatever it doesn't find on the ftp site...

Note that this needs to disable FETCH_PACKAGES, so in some cases, it will
build more stuff than is available (if it needs to build something, and
it discovers some dependencies are missing, it will build them as well).

In many cases, setting FETCH_PACKAGES=Yes is a simpler way to achieve
similar results.

src: urls will mostly be useful for pkg_add -u.

Reply via email to