Naming a locally-built version of a package
matthew at FreeBSD.org
Tue Jul 14 21:15:12 UTC 2015
On 14/07/2015 19:23, Wim Lewis wrote:
> Is $PORTREVISION a good place to note the presence and revision of
> my local changes (e.g., as "o3" since only one letter is allowed)? Is pkg's
> version-number-comparison behavior documented somewhere--- how it orders
> alphabetics and what it does with the VERSION and REVISION parts of the
> version string?
You can test the ordering of two version strings using 'pkg version -t'
Note however, if your modified version is Foo-1.0.0.o1 and an update is
pulled in from upstream then the regular port version Foo-1.0.1 will
supersede your locally modified version. You might find it more
effective to use an epoch number instead: Foo-1.0.0;1 which will always
sort higher than anything without the ';1' bit. Beware though that once
you've added an epoch number you can never remove it.
> Would it be reasonable to treat local patches as options? That is, my
> local variant of Foo-1.3_5 would still be named Foo-1.3_5.o3, but
> would have the option SPIFFY_LOCAL_PATCH. I've noticed that pkg
> records the build options of packages but it's not clear to me what
> it does with that information (if anything; is this just there to
> support future behavior that hasn't been implemented yet?).
pkg(8) tracks the option settings almost entirely for documentation
purposes at the moment. They don't feature in what the solver is doing
currently -- but keep watching this space. You can add your local
changes as new options if you like, but I don't think it's going to have
quite the effect you're hoping it will.
There are a number of changes which are going to hit the ports in the near
future, particularly 'FLAVOURS' which you might find interesting.
FLAVOURS is all about compiling certain ports several times with
alternate dependency choices, eg. 'Foo with mysql' vs. 'Foo with
postgresql' vs 'Foo with sqlite'
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 971 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions