Browse Source
The dependencies are needed both at build time and at run time. Build time needs them for running tests. To avoid duplicating the (long!) list of dependencies, we do a little bit of trickery, and generate a koha:Depends substvar, from all build dependencies (except debhelper), and use ${koha:Depends} in the koha-common (not koha) Depends header. A little bit tricky, but works. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>3.4.x
committed by
Chris Cormack
3 changed files with 88 additions and 4 deletions
@ -0,0 +1,21 @@ |
|||
#!/usr/bin/python |
|||
|
|||
import re |
|||
import debian.deb822 |
|||
|
|||
exclusions = [ |
|||
'debhelper', |
|||
] |
|||
|
|||
exclusions = [re.compile(s) for s in exclusions] |
|||
|
|||
depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends') |
|||
deps = [s.strip() for s in depstring.split(',')] |
|||
result = [] |
|||
for dep in deps: |
|||
for ex in exclusions: |
|||
if ex.match(dep): |
|||
break |
|||
else: |
|||
result.append(dep) |
|||
print 'koha:Depends=%s' % ', '.join(result) |
Loading…
Reference in new issue