mirror of https://gitlab.com/ita1024/waf.git
Exclude wafcache symlink handling
- Exclude classes having folder or symlinks - Exclude well-known Task classes from wafcache processing - Remove stale 'waflib.Task.Task.chmod' processing
This commit is contained in:
parent
d1eb41f944
commit
b41f13b3a0
|
@ -105,11 +105,17 @@ def put_files_cache(self):
|
||||||
if WAFCACHE_NO_PUSH or getattr(self, 'cached', None) or not self.outputs:
|
if WAFCACHE_NO_PUSH or getattr(self, 'cached', None) or not self.outputs:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
files_from = []
|
||||||
|
for node in self.outputs:
|
||||||
|
path = node.abspath()
|
||||||
|
if not os.path.isfile(path):
|
||||||
|
return
|
||||||
|
files_from.append(path)
|
||||||
|
|
||||||
bld = self.generator.bld
|
bld = self.generator.bld
|
||||||
sig = self.signature()
|
sig = self.signature()
|
||||||
ssig = Utils.to_hex(self.uid() + sig)
|
ssig = Utils.to_hex(self.uid() + sig)
|
||||||
|
|
||||||
files_from = [node.abspath() for node in self.outputs]
|
|
||||||
err = cache_command(ssig, files_from, [])
|
err = cache_command(ssig, files_from, [])
|
||||||
|
|
||||||
if err.startswith(OK):
|
if err.startswith(OK):
|
||||||
|
@ -181,6 +187,10 @@ def make_cached(cls):
|
||||||
if getattr(cls, 'nocache', None) or getattr(cls, 'has_cache', False):
|
if getattr(cls, 'nocache', None) or getattr(cls, 'has_cache', False):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
full_name = "%s.%s" % (cls.__module__, cls.__name__)
|
||||||
|
if full_name in ('waflib.Tools.ccroot.vnum', 'waflib.Build.inst'):
|
||||||
|
return
|
||||||
|
|
||||||
m1 = getattr(cls, 'run', None)
|
m1 = getattr(cls, 'run', None)
|
||||||
def run(self):
|
def run(self):
|
||||||
if getattr(self, 'nocache', False):
|
if getattr(self, 'nocache', False):
|
||||||
|
@ -196,9 +206,6 @@ def make_cached(cls):
|
||||||
return m2(self)
|
return m2(self)
|
||||||
ret = m2(self)
|
ret = m2(self)
|
||||||
self.put_files_cache()
|
self.put_files_cache()
|
||||||
if hasattr(self, 'chmod'):
|
|
||||||
for node in self.outputs:
|
|
||||||
os.chmod(node.abspath(), self.chmod)
|
|
||||||
return ret
|
return ret
|
||||||
cls.post_run = post_run
|
cls.post_run = post_run
|
||||||
cls.has_cache = True
|
cls.has_cache = True
|
||||||
|
|
Loading…
Reference in New Issue