There have been some big changes in pkg_add again.

Finally, there is now a 'quirks" package that will be used to handle weird
update scenarios. It amounts to a Quirks.pm module that can build a quirks
object that conforms to pkg_add's interface. This can change independently:
pkg_add builds the quirks object with an API version number: either quirks
knows that API, and it can build the object, or it doesn't and it won't
build the object.  The rest of pkg_add doesn't care whether there's a quirks
object or not (all changes are optional).


Note that this is not permission to do *anything* with package names. Quirks
is intended for exceptional situations. It does not happen all that often that
package change names, or that stuff becomes part of the base system...


So far, the quirks object is version 1, and it can do 3 things:
- tweak the list of updatesets to install at the start (we don't use this
for now)
- know whether a package is now part of the base system: this is handled
through a hash of the form:
stem => file:
we're dealing with removing packages named stem-*, and we will remove them
if file is installed on the system.
e.g., I have:

my $base_exceptions = {
        'p5-version' => "/usr/libdata/perl5/version.pm"
};

for tests.

- know whether a package changed name. Again, this is a hash of the form:
stem => extra_stem

I tested this worked by updating a foo-0.0 to a bar-0.0 after adding
foo => bar

Please get any special changes you want through me, for the time being.
Mid-term, the "not really code" of Quirks is probably going to move to a
separate list. For now, I'm quite happy adding entries to those hashes...

Reply via email to