Commit c66df069 authored by Julien Muchembled's avatar Julien Muchembled

re6st: fix Debian build with recent obs-build

Also stop using deprecated TarFile.add's exclude parameter.
parent 558dcf28
...@@ -178,10 +178,10 @@ def tarball(task): ...@@ -178,10 +178,10 @@ def tarball(task):
t.add("re6stnet/daemon") t.add("re6stnet/daemon")
for x in upstream.outputs: for x in upstream.outputs:
t.add(x) t.add(x)
def exclude(path): def tar_filter(info):
return path.endswith('/.git') return None if info.name.endswith('/.git') else info
for x in BUILD_KEEP: for x in BUILD_KEEP:
t.add(BUILD + "/" + x, exclude=exclude) t.add(BUILD + "/" + x, filter=tar_filter)
@task(sdist, "debian/changelog") @task(sdist, "debian/changelog")
def dch(task): def dch(task):
...@@ -210,7 +210,9 @@ def deb(task): ...@@ -210,7 +210,9 @@ def deb(task):
# Unfortunately, OBS does not support symlinks. # Unfortunately, OBS does not support symlinks.
with make_tar_gz(task.outputs[0], mtime, dereference=True) as t: with make_tar_gz(task.outputs[0], mtime, dereference=True) as t:
added = glob("debian/*") added = glob("debian/*")
t.add("debian") t.add("debian", filter=lambda info:
# https://github.com/openSUSE/obs-build/pull/646
None if info.name == "debian/source" else info)
x = "debian/control" x = "debian/control"
tarfile_addfileobj(t, x, patched_control, control) tarfile_addfileobj(t, x, patched_control, control)
added.append(x) added.append(x)
......
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