Commit dbdea2a0 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Partially revert previous commit (remove file-urlmd5-exclude option)

We want buildout to cache as many things as possible.

This partially reverts commit 10478e98.
parent 10478e98
Pipeline #33760 failed with stage
in 0 seconds
...@@ -525,13 +525,6 @@ class Buildout(DictMixin): ...@@ -525,13 +525,6 @@ class Buildout(DictMixin):
except Exception: except Exception:
self._logger.exception( self._logger.exception(
"Failed to setup Networkcache. Continue without.") "Failed to setup Networkcache. Continue without.")
else:
networkcache_client._buildout_download_filter = match_list = []
for pattern in networkcache_section.get('file-urlmd5-exclude',
'').split():
include = pattern.startswith('!')
match_list.append((not include,
re.compile(pattern[include:]).match))
def _buildout_path(self, name): def _buildout_path(self, name):
if '${' in name: if '${' in name:
......
...@@ -300,9 +300,7 @@ class Download(Download): ...@@ -300,9 +300,7 @@ class Download(Download):
def _download(self, url, path, md5sum=None, alternate_url=None): def _download(self, url, path, md5sum=None, alternate_url=None):
from .buildout import networkcache_client as nc from .buildout import networkcache_client as nc
while nc: # not a loop while nc: # not a loop
if (self._auth(url) # do not cache restricted data if self._auth(url): # do not cache restricted data
or next((x for x, match in nc._buildout_download_filter
if match(url)), False)):
nc = None nc = None
break break
key = 'file-urlmd5:' + md5(url.encode()).hexdigest() key = 'file-urlmd5:' + md5(url.encode()).hexdigest()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment