Repository :
http://git.fedorahosted.org/cgit/
On branch : v1.4
---------------------------------------------------------------
commit 61eb2ed9b5673868b43acd6303fb1565f3c0d784
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jun 17 22:48:14 2013 -0500
crawler: symlink fix, printing fix
1) when doing rsync crawling, allow symlinks to have the "wrong" size
for the file.
2) print a line when we change from not up-to-date to up-to-date, and
a different line for vice versa.
---------------------------------------------------------------
server/crawler_perhost | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/crawler_perhost b/server/crawler_perhost
index 2e3e84c..0156c6c 100755
--- a/server/crawler_perhost
+++ b/server/crawler_perhost
@@ -327,6 +327,8 @@ def sync_hcds(host, host_category_dirs):
hcd.sync()
if up2date == False:
print >>logfile, "Directory %s is not up-to-date on this
host." % d.name
+ else:
+ print >>logfile, d.name
current_hcds[hcd] = True
@@ -480,7 +482,7 @@ def try_percategory(trydirs, url, host_category_dirs, hc, host,
categoryPrefixLe
else:
key = name + "/" + file
try:
- if rsync[key]['size'] != d.files[file]['size']:
+ if rsync[key]['size'] != d.files[file]['size'] and not
rsync[key]['mode'].startswith('l'): # ignore symlink size differences
sys.stdout.write('rsync: file size mismatch %s %s != %s\n' %
(file, d.files[file]['size'], rsync[key]['size']))
sys.stdout.flush()
all_files = False
@@ -499,7 +501,6 @@ def try_percategory(trydirs, url, host_category_dirs, hc, host,
categoryPrefixLe
if all_files is False:
host_category_dirs[(hc, d)] = False
else:
- print d.name
host_category_dirs[(hc, d)] = True
host_category_dirs = add_parents(host_category_dirs, hc, d)