axkibe/lsyncd — Issue #37: compilation warnings and lbash copy errors
Author: axkibe
Created: 2011-11-16 15:01:37+00:00
State: open

Originally filed by marc.s...@gmail.com on 2010-11-26T10:46:53

What steps will reproduce the problem?
1.source compilation generate warnings
(inotify.c:75: warning /inotify.c:91: warning)

# make
make all-am
make[1]: Entering directory `/usr/src/svn'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -I/usr/local/include -MT lsyncd.o -MD -MP -MF ".deps/lsyncd.Tpo" -c -o lsyncd.o lsync d.c; \
then mv -f ".deps/lsyncd.Tpo" ".deps/lsyncd.Po"; else rm -f ".deps/lsyncd.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -I/usr/local/include -MT inotify.o -MD -MP -MF ".deps/inotify.Tpo" -c -o inotify.o in otify.c; \
then mv -f ".deps/inotify.Tpo" ".deps/inotify.Po"; else rm -f ".deps/inotify.Tpo"; exit 1; fi
inotify.c: In function ‘l_addwatch’:
inotify.c:75: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘lua_Integer’
inotify.c: In function ‘l_rmwatch’:
inotify.c:91: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘lua_Integer’
luac lsyncd.lua

2.using lbash.lua with nodaemon=false

3.creating mkdir -p /src/a/b/c/d/e/f

on the target :
# tree -L 10 /trg/
/trg/
`-- a
`-- b
|-- b
| `-- c
| `-- d
| `-- e
| `-- f
`-- c
|-- c
| `-- d
| `-- e
| `-- f
`-- d
|-- d
| `-- e
| `-- f
`-- e
|-- e
| `-- f
`-- f
`-- f

duplicated directories on target ...

--------------------------------------------------------------
lsyncd 2 - r426 - linux redhat 5.3 64
--------------------------------------------------------------
tail -f "/tmp/lsyncd.log"
Fri Nov 26 10:59:47 2010 Normal: Event Blanket spawns shell 'if [ "$(ls -A /src/)" ]; then cp -r /src/* /trg/; fi'
Fri Nov 26 10:59:47 2010 Normal: Startup of '/src/' finished.
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a /trg//a'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b /trg//a/b'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c /trg//a/b/c'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d /trg//a/b/c/d'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d/e /trg//a/b/c/d/e'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/e/ = 0
Fri Nov 26 11:01:35 2010 Normal: Event Create spawns shell 'cp -r /src//a/b/c/d/e/f /trg//a/b/c/d/e/f'
Fri Nov 26 11:01:35 2010 Normal: Finished Create on /src//a/b/c/d/e/f/ = 0

-----------------------------------------------------
# tail -f /tmp/lsyncd.stat
Lsyncd status report at Fri Nov 26 10:59:47 2010

Sync1 source=/src/
There are 0 delays
Excluding:
nothing.

Watching 1 directories
1: /src/
2: /src/a/
3: /src/a/b/
4: /src/a/b/c/
5: /src/a/b/c/d/
6: /src/a/b/c/d/e/
7: /src/a/b/c/d/e/f/

sincerely yours ...