I committed a set of "useful features" that go together and will be in
OpenBSD 6.0.

- branch info choice on package stems.
when you say
pkg_add php
you end up having to choose which php you want.

now you can say
pkg_add php%5.5

this "selects the 5.5 branch", which is already encoded as
pkgpath www/php/5.5 in the ports tree.


- a new mode for pkg_info (-z) meant to replace pkg_add -z usage over time.
This does solve the problem of wanting to take some package install, and
do "more or less the same" on a different version of OpenBSD.
Packages with multiple versions were something of a problem, because
pkg_add -z mode doesn't really have reliable information to choose.

Now,
pkg_info -zm >list
will display proper information for all packages you manually installed.

Later, you can do
pkg_add -l list
and it will give you a much better approximation of your former install.

Basically, ports with several branches in the tree have been updated to
include an @option is-branch marker, which pkg_info uses to spew out
branch info.

Typical info spewed out by pkg_info -z will look like:
OpenEXR--
angband--no_x11
python--%2.7

The --[flavor] part is necessary for packages which have several flavors,
and pkg_info doesn't know enough to remove it for ports without flavors
(also, you can't really predict when a port will gain flavors).

- this also works for package files. Doing
pkg_info -z *.tgz in a repository will give you a list of packages with
most version information removed... This might actually be a useful tool
to compare two packages builds in a bulk setup.


The is-branch marker works for most ports. I'm currently in the process
of fixing the three odd ones.

What remains is to add a bit of code to check-problems to look at stem
and branch info and display error messages for the packages that need
@option is-branch.

There might be some update issues somewhere down the road. I haven't
predicted any yet, but it might be some supplementary quirks code may
be needed somewhen.

Note that this mechanism doesn't affect THAT many packages (around 200 
packages out of the 9500+ we have), but they tend to be rather ubiquitous
so this ought to help some people a great deal.

Reply via email to