summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/sb/config.py')
-rw-r--r--source-builder/sb/config.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
index 5eb2d2a..baba751 100644
--- a/source-builder/sb/config.py
+++ b/source-builder/sb/config.py
@@ -229,8 +229,9 @@ class file:
_ignore = [ re.compile('%setup'),
re.compile('%configure'),
- re.compile('%source[0-9]*'),
- re.compile('%patch[0-9]*'),
+ re.compile('%source'),
+ re.compile('%patch'),
+ re.compile('%hash'),
re.compile('%select'),
re.compile('%disable') ]
@@ -671,6 +672,9 @@ class file:
def _sources(self, ls):
return sources.process(ls[0][1:], ls[1:], self.macros, self._error)
+ def _hash(self, ls):
+ return sources.hash(ls[1:], self.macros, self._error)
+
def _define(self, config, ls):
if len(ls) <= 1:
log.warning('invalid macro definition')
@@ -892,6 +896,11 @@ class file:
d = self._sources(ls)
if d is not None:
return ('data', d)
+ elif ls[0] == '%hash':
+ if isvalid:
+ d = self._hash(ls)
+ if d is not None:
+ return ('data', d)
elif ls[0] == '%patch':
if isvalid:
self._select(config, ls)