I've seen a few updates that change gratuitous details, such as the
package name or the base directory where things live...

PLEASE REMEMBER TO CHECK THAT THINGS UPDATE AFTER YOUR UPGRADE.

It's *not* a new port, so people using the old one should be able to 
update.

Again, here's what's going on for an update.

- pkg_add first checks the name of the installed package.
By default, it will *not* look at packages with a different stem.
So, foo-1.0 will *not* update to foo2-2.0.
=> if you want to rename the package, this requires a quirks addition.
*this is costly*. Not incredibly so, but enough that gratuitous renames
are very much frowned upon.

- once candidates have been found based on their names, pkg_add will look
inside to figure out which candidates can actually  update the old package.
First, packages must conflict. Again, packages conflict with packages of
the same stem by default. If the stem, changes, you need to add a conflict
annotation. 
=> So to update from foo-1.0 to foo2-2.0, you need *both* a quirks
and a @conflict foo-* in foo2-2.0.

- the package system uses the FULLPKGPATH of both packages to figure out update
paths: that's the way that, for instance, stable/postfix stays on the
stable/postfix branch, and does not switch over to snapshot/postfix
arbitrarily...
=> if you change the FULLPKGPATH or the flavor, you also need a
@pkgpath annotation in the new package.


*ALL THOSE CHANGES ARE THERE FOREVER*. If you do a name change, a subdir
change, you can't go back, and we have to support the old names over long
period of times. The package system basically never breaks, you can *still*
update package installations from 5 years ago without a problem.

=> if you fuck that up, going back to the old scheme may be complicated.

Package updates normally have some failsafes to avoid going backwards:
see the concept of "package signatures" used by out-of-date.
When the package base name changes, there is NO LONGER any possible 
comparison (see packages-specs(7) for normal version comparisons).
=> this again is a minor reason not to change this too much.

Reply via email to