Naming a locally-built version of a package
William A. Mahaffey III
wam at hiwaay.net
Tue Jul 14 22:34:21 UTC 2015
On 07/14/15 16:21, Matthew Seaman wrote:
> 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.
Hmmmm .... If it is indeed aware of pkg options, could it decide to
favor pkg's w/ other-than-std. options, on the assumption that the user
was locally overriding something on his/her own judgment ? $0.02, no
more, no less ....
> 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'
William A. Mahaffey III
"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
More information about the freebsd-questions