Subject: Re: CVS commit: pkgsrc/mail/mutt
To: None <tech-pkg@NetBSD.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 07/17/2004 16:58:59
On Jul 17, 2004, at 2:14 PM, Jeremy C. Reed wrote:

> On Sat, 17 Jul 2004, Amitai Schlair wrote:
>
>> Log Message:
>> As an "overwrite" package, install mbox.5 as mutt-mbox.5 to avoid
>> conflicting with qmail's mbox.5 in an upcoming update. As a "pkgviews"
>> package, install with the original filename and let the sysadmin
>> decide which mbox.5 should be in which view. Bump PKGREVISION. OK'd
>> by tron.
>
> How does the admin decide which mbox.5?
>
> I don't use the pkgviews "views" much, but what if you want qmail and 
> mutt
> at same time in the symlinked view, what would happen?
>
> Maybe it should always be mutt-mbox.5, or maybe the qmail one renamed.
> Which one is the best?

The commit was a hack to avoid a gratuitous conflict between qmail and 
mutt (which work quite well together). The scope of the hack was 
deliberately limited to "overwrite" installations because pkgviews 
handles filename conflicts more gracefully: there's no conflict until 
they're linked into the same view, and then the source of the conflict 
is clear by inspection with "ls -l".

Here's an example of how pkgviews currently handles filename conflicts:

1) Install mutt on a new system. "man mbox" displays mutt's mbox.5.

2) Install qmail (I have local changes to support pkgviews):

===> Building views for qmail-1.03nb7
=> Performing package view clash check for qmail-1.03nb7 in standard 
view
=> Performing package view overwrite check for qmail-1.03nb7 in 
standard view
***********************************************************
**** The following symbolic links will be overwritten *****
lrwxr-xr-x  1 root  wheel  49 Jul 17 15:54 /usr/pkg//man/man5/mbox.5 -> 
/usr/pkg/packages/mutt-1.4.2.1nb2/man/man5/mbox.5
***********************************************************
=> Linking package into standard view
ln: /usr/pkg/man/man5/mbox.5: File exists

3) The link has not in fact been overwritten -- it still points to 
mutt's mbox.5. (However, "man mbox" shows qmail's mbox.5 because qmail 
also installs catted man pages.)

4) Delete the mutt package. The man/man5/mbox.5 symlink is gone from 
the default view.

5) Remove qmail from the default view, then re-add it. The 
man/man5/mbox.5 symlink is back and points to qmail's mbox.5.

There may well be some ways to further polish pkgviews' conflict 
handling, but it's already a strong improvement over overwrite 
packages. If a sysadmin links mutt and qmail into the same view, he 
gets to decide which man page people see (by installing in a particular 
order, or by changing the symlink); if he links the packages into 
different views, users get to decide (by changing their PATH or 
MANPATH).

pkgviews gives us the flexibility to defer these conflict-resolution 
decisions to sysadmins and users, who generally have a better idea of 
what they want than do package maintainers. It's only for the 
"overwrite" case that something needed to be done to let qmail and mutt 
coexist. Matthias graciously agreed to modify mutt instead of qmail so 
that if we ever get working qmail binary packages, we're in the clear 
to redistribute them.

- Amitai