Skip to content
Snippets Groups Projects
Commit dbb3ac45 authored by Julian's avatar Julian
Browse files

Fix PHP version constraints and libxml2 dependency

Closes #2
parent 170cb19a
No related branches found
No related tags found
No related merge requests found
Pipeline #15047 passed
......@@ -62,9 +62,9 @@ def get_debian_packages_for_php_extension(name, minver=None, maxver=None):
# libxml is builtin, but some apps have version requirements for the underlying libxml2
res = []
if minver is not None:
res.append(f'libxml (>= {minver})')
res.append(f'libxml2 (>= {minver})')
if maxver is not None:
res.append(f'libxml (<< {maxver})')
res.append(f'libxml2 (<< {maxver})')
return res
if name in {'calendar', 'ctype', 'exif', 'ffi', 'fileinfo', 'ftp',
'gettext', 'iconv', 'pdo', 'phar', 'posix', 'shmop', 'sockets',
......@@ -107,8 +107,10 @@ def create_debian_dir(app):
dependencies.append(f'nextcloud')
minver, maxver = parse_version_spec(release['phpVersionSpec'])
if minver is not None:
minver = re.sub(r'\.[0-9]+$', '', minver) # package version only has two digits
dependencies.append(f'php (>= 2:{minver})')
if maxver is not None:
maxver = re.sub(r'\.[0-9]+$', '', maxver) # package version only has two digits
dependencies.append(f'php (<< 2:{maxver})')
if minver is None and maxver is None:
dependencies.append(f'php')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment