Re: SRC in PKG_PATH ( was Re: updating ports after OS update )

Previous thread: softraid device mismatch by Frank Garcia on Thursday, May 15, 2008 - 2:55 pm. (1 message)

Next thread: Asia Resort Market Review by David Kan on Thursday, May 15, 2008 - 10:30 pm. (1 message)
To: <misc@...>
Date: Thursday, May 15, 2008 - 10:19 pm

Hi Folks,

in the upgrade guide there is a description of how to update packages after
the OS has been updated. The command mentioned is (with the appropriate env
variable(s) set):

# pkg_add -ui -F update -F updatedepends

What do I need to do about the numerous ports I built and installed? Do
they need to be updated manually?

Also, I'm currently running 4.1, and would like to get to 4.3. I guess I
will need to do this in two hops. Can I postpone package updating until
I've finished updating the OS to 4.3?

cheers,

Robert Urban

To: Robert Urban <urban@...>
Cc: <misc@...>
Date: Friday, May 16, 2008 - 3:34 am

The packages you built manually, assuming you used a virgin ports tree,
are no different from the distributed packages.

You can update safely from our tree. Things may fail if you run into
a package that's not distributed (java comes to mind), but it will fail
decently, and you can update the required packages manually, then proceed
with update.

You can also set FETCH_PACKAGES to Yes and update using the ports tree.

You can skip one release, the ports tree tools can deal with old stuff
without any issue.

To: <espie@...>, OpenBSD Misc <misc@...>
Date: Friday, May 16, 2008 - 2:47 pm

Marc - where is this documented? i can't find it in pkg_add, package,
or friends.

Ben

To: Ben Calvert <ben@...>
Cc: OpenBSD Misc <misc@...>
Date: Friday, May 16, 2008 - 3:51 pm

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.

Previous thread: softraid device mismatch by Frank Garcia on Thursday, May 15, 2008 - 2:55 pm. (1 message)

Next thread: Asia Resort Market Review by David Kan on Thursday, May 15, 2008 - 10:30 pm. (1 message)