Bug#824244: libfilesys-notify-simple-perl: fails to notify on moves with inotify

2016-05-14 Thread Eric Wong
gregor herrmann  wrote:
> On Sat, 14 May 2016 04:22:46 +, Eric Wong wrote:
> > I also tried 0.12-1 from jessie with the same effect.
> So this needs further investigation ...

Sorry for the noise, I screwed up the include path when using
the jessie module from my wheezy system.

This only affects wheezy with 0.08 (and I really need
to carve out the time+bandwidth to upgrade).



Bug#824244: libfilesys-notify-simple-perl: fails to notify on moves with inotify

2016-05-14 Thread gregor herrmann
On Sat, 14 May 2016 04:22:46 +, Eric Wong wrote:

> I tried to have this watch some Maildirs but it fails to
> detect rename() calls.  So this probably should watch for
> IN_MOVED_TO and IN_MOVED_FROM events from inotify.
> 
> I also tried 0.12-1 from jessie with the same effect.

Thanks for your bug report.

I haven't tried myself now, but looking at the code this should work.
Filesys::Notify::Simple uses Linux::Inotify2, and does:

my $inotify = Linux::Inotify2->new;

my $fs = _full_scan(@path);
for my $path (keys %$fs) {
$inotify->watch($path, 
_MODIFY|_CREATE|_DELETE|_DELETE_SELF|_MOVE_SELF|_MOVE);
}

and, according to the Linux::Inotify2 documentation:
IN_MOVE  same as IN_MOVED_FROM | IN_MOVED_TO


So this needs further investigation ...


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Pink Floyd: On the Turning Away


signature.asc
Description: Digital Signature


Bug#824244: libfilesys-notify-simple-perl: fails to notify on moves with inotify

2016-05-13 Thread Eric Wong
Package: libfilesys-notify-simple-perl
Version: 0.08-1
Severity: normal

I tried to have this watch some Maildirs but it fails to
detect rename() calls.  So this probably should watch for
IN_MOVED_TO and IN_MOVED_FROM events from inotify.

I also tried 0.12-1 from jessie with the same effect.