Bug 28496

Summary: Fix pkg-plist for mail/cyrus
Product: Ports & Packages Reporter: Pete Fritchman <petef>
Component: Individual Port(s)Assignee: FUJISHIMA Satsuki <sf>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Pete Fritchman 2001-06-29 00:20:01 UTC
pkg-plist is missing a file that causes a @dirrm to fail.

How-To-Repeat: 
http://bento.freebsd.org/errorlogs/4-full/cyrus-1.6.24_1.log
Comment 1 FUJISHIMA Satsuki freebsd_committer freebsd_triage 2001-06-29 15:29:00 UTC
State Changed
From-To: open->closed

Committed, thanks.
Comment 2 Scot W. Hetzel 2001-06-29 19:28:49 UTC
From: "Pete Fritchman" <petef@databits.net>
> >Description:
>
> pkg-plist is missing a file that causes a @dirrm to fail.
>
> >How-To-Repeat:
>
> http://bento.freebsd.org/errorlogs/4-full/cyrus-1.6.24_1.log
>
> >Fix:
>
> Index: pkg-plist
> ===================================================================
> RCS file: /home/ncvs/ports/mail/cyrus/pkg-plist,v
> retrieving revision 1.10
> diff -u -r1.10 pkg-plist
> --- pkg-plist 2001/05/19 18:16:36 1.10
> +++ pkg-plist 2001/06/28 22:51:05
> @@ -15,6 +15,7 @@
>  cyrus/bin/reconstruct
>  cyrus/bin/syncnews
>  cyrus/bin/timsieved
> +etc/imap/mailboxes
>  etc/imapd.conf.dist
>  etc/inetd.conf.cyrus
>  include/cyrus/acl.h
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
>
Please undo this change as it removes the list of all mailboxes and
associated mailfolders that have been created on the Cyrus IMAP server when
you upgrade the server.

The @dir etc/imap should be allowed to fail instead.

Scot
Comment 3 Scot W. Hetzel 2001-06-29 19:51:11 UTC
>  The @dir etc/imap should be allowed to fail instead.
           ^
            @dirrm
>

I also noticed one more problem:

    @${ECHO} "@exec ${CP} /dev/null %D/etc/imap/mailboxes" >>${TMPPLIST}

should be changed to:

    @${ECHO} "@exec ${TOUCH} %D/etc/imap/mailboxes" >>${TMPPLIST}
    @${ECHO} "@unexec [ ! -s %D/etc/imap/mailboxes ] && ${RM}
%D/etc/imap/mailboxes" >>${TMPPLIST}

in the Makefile, otherwise the package will wipeout the mailboxes file.  The
second line should solve the uninstall problem with bento.

Scot
Comment 4 FUJISHIMA Satsuki freebsd_committer freebsd_triage 2001-06-29 22:43:19 UTC
Responsible Changed
From-To: freebsd-ports->sf

I'm taking care of this.
Comment 5 FUJISHIMA Satsuki freebsd_committer freebsd_triage 2001-06-29 23:03:29 UTC
At Fri, 29 Jun 2001 13:28:49 -0500,
Scot W. Hetzel <hetzels@westbend.net> wrote:
> Please undo this change as it removes the list of all mailboxes and
> associated mailfolders that have been created on the Cyrus IMAP server when
> you upgrade the server.

No problem. pkg_delete(8) will not delete files which changed after
install.

# pkg_add -r cyrus
# ls -l /usr/local/etc/imap/mailboxes
-rw-r-----  1 cyrus  cyrus  0 Jun 30 06:31 /usr/local/etc/imap/mailboxes
# echo foo >> /usr/local/etc/imap/mailboxes
# pkg_delete 'cyrus-1*'
pkg_delete: unable to completely remove directory '/usr/local/etc/imap'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
# ls -l /usr/local/etc/imap/mailboxes
-rw-r-----  1 cyrus  cyrus  4 Jun 30 06:32 /usr/local/etc/imap/mailboxes

> The @dir etc/imap should be allowed to fail instead.

Good idea.

>     @${ECHO} "@exec ${TOUCH} %D/etc/imap/mailboxes" >>${TMPPLIST}
>     @${ECHO} "@unexec [ ! -s %D/etc/imap/mailboxes ] && ${RM}
> %D/etc/imap/mailboxes" >>${TMPPLIST}

I've just committed new revision. Please try it.

-- 
FUJISHIMA Satsuki
Comment 6 toreishi 2001-06-29 23:18:15 UTC
Please nevermind, I've reminded this part. ``pkg_delete -f'' removes
even if checksum was wrong.

At Sat, 30 Jun 2001 07:03:29 +0900,
FUJISHIMA Satsuki wrote:
> 
> At Fri, 29 Jun 2001 13:28:49 -0500,
> Scot W. Hetzel <hetzels@westbend.net> wrote:
> > Please undo this change as it removes the list of all mailboxes and
> > associated mailfolders that have been created on the Cyrus IMAP server when
> > you upgrade the server.
> 
> No problem. pkg_delete(8) will not delete files which changed after
> install.
> 
> # pkg_add -r cyrus
> # ls -l /usr/local/etc/imap/mailboxes
> -rw-r-----  1 cyrus  cyrus  0 Jun 30 06:31 /usr/local/etc/imap/mailboxes
> # echo foo >> /usr/local/etc/imap/mailboxes
> # pkg_delete 'cyrus-1*'
> pkg_delete: unable to completely remove directory '/usr/local/etc/imap'
> pkg_delete: couldn't entirely delete package (perhaps the packing list is
> incorrectly specified?)
> # ls -l /usr/local/etc/imap/mailboxes
> -rw-r-----  1 cyrus  cyrus  4 Jun 30 06:32 /usr/local/etc/imap/mailboxes