<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #3271: mutt 1.5.20 regression: not updating time fields



#3271: mutt 1.5.20 regression: not updating time fields on mbox
-------------------------------+--------------------------------------------
  Reporter:  antonio@xxxxxxxx  |       Owner:  pdmef   
      Type:  defect            |      Status:  accepted
  Priority:  minor             |   Milestone:  1.6     
 Component:  mutt              |     Version:  1.5.20  
Resolution:                    |    Keywords:          
-------------------------------+--------------------------------------------

Comment(by antonio@xxxxxxxx):

 From the reporter:

 {{{
 Hi Antonio and Rocco,

 Thanks, but I'm still seeing the bug with 1.5.20-1+fix533439.
 Setting the access time to be equal to the modification time
 seems to be an edge case that works for Bash but not XBiff.

 xbiff's algorithm ("reset" means the user clicked on xbiff with
 the mouse):
  Now check for changes.  If reset is set then we want to pretent that
  there is no mail.  If the mailbox is empty then we want to turn off
  the flag.  Otherwise if the mailbox has changed size then we want to
  put the flag up, unless the mailbox has been read since the last
  write.

  The cases are:
     o  forced reset by user                        DOWN
     o  no mailbox or empty (zero-sized) mailbox    DOWN
     o  if read after most recent write             DOWN
     o  same size as last time                      no change
     o  bigger than last time                       UP
     o  smaller than last time but non-zero         UP


 Mutt's mbox(5) manpage matches Mutt 1.5.20's system:
  If the modification-time (usually determined via stat(2)) of a
  nonempty mbox file is greater than the access-time the file has
  new mail.

 I'm not sure what to do with this bug now.




 Some test results:

 xbiff only checks for updates every 30 seconds, unless it's
 forced to redraw by being obscured and then exposed (which I'm
 doing at every stage in testing this).

 Similarly I've set bash's MAILCHECK delay to 1 second.

 I'm running "frm" in the middle (package mailutils, lists the
 headers of all mails), but omitting that step doesn't change the
 results of the other steps.

 During the test below, there is other mail in the mailbox, but
 none of it has the "old" or "new" flags set.

 New mail received
 xbiff: new mail
 bash: you have new mail (or sometimes just "you have mail")

    File: `/var/mail/steve'
    Size: 731600         Blocks: 1440       IO Block: 4096   regular file
  Device: 807h/2055d     Inode: 570084      Links: 1
  Access: (0660/-rw-rw----)  Uid: ( 1010/   steve)   Gid: ( 1010/   steve)
  Access: 2009-06-19 10:48:28.000000000 +0100
  Modify: 2009-06-19 10:50:35.000000000 +0100
  Change: 2009-06-19 10:50:35.000000000 +0100

 Run "frm"
 xbiff: clear
 bash: (no prompt)

    File: `/var/mail/steve'
    Size: 731600         Blocks: 1440       IO Block: 4096   regular file
  Device: 807h/2055d     Inode: 570084      Links: 1
  Access: (0660/-rw-rw----)  Uid: ( 1010/   steve)   Gid: ( 1010/   steve)
  Access: 2009-06-19 10:51:25.000000000 +0100
  Modify: 2009-06-19 10:50:35.000000000 +0100
  Change: 2009-06-19 10:50:35.000000000 +0100

 Run mutt, read the mail, leave it in the mailbox and exit
 xbiff: new mail
 bash: (no prompt)

    File: `/var/mail/steve'
    Size: 731638         Blocks: 1440       IO Block: 4096   regular file
  Device: 807h/2055d     Inode: 570084      Links: 1
  Access: (0660/-rw-rw----)  Uid: ( 1010/   steve)   Gid: ( 1010/   steve)
  Access: 2009-06-19 10:50:35.000000000 +0100
  Modify: 2009-06-19 10:50:35.000000000 +0100
  Change: 2009-06-19 10:52:02.000000000 +0100

 Run mutt a second time and exit immediately
 xbiff: clear
 bash: (no prompt)

    File: `/var/mail/steve'
    Size: 731638         Blocks: 1440       IO Block: 4096   regular file
  Device: 807h/2055d     Inode: 570084      Links: 1
  Access: (0660/-rw-rw----)  Uid: ( 1010/   steve)   Gid: ( 1010/   steve)
  Access: 2009-06-19 10:52:40.000000000 +0100
  Modify: 2009-06-19 10:50:35.000000000 +0100
  Change: 2009-06-19 10:52:40.000000000 +0100

 Cheers,
 Steve
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3271#comment:8>
Mutt <http://www.mutt.org/>
The Mutt mail user agent