gst-worktree: add support for wrap file without 'directory' field

The script is currently not usable because of pango.wrap not having the
'directory' field and relying on the default from the file name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/201>
This commit is contained in:
Guillaume Desmottes 2020-10-07 15:01:10 +02:00
parent 9c90e6a1c3
commit 4a2e037fd6

View file

@ -29,7 +29,9 @@ def parse_wrapfile(wrapf):
if 'wrap-git' not in cgp: if 'wrap-git' not in cgp:
return None return None
section = cgp['wrap-git'] section = cgp['wrap-git']
return section['directory'], section['revision'] # Default to the wrapper filename if 'directory' field is missing
directory = section.get('directory', os.path.splitext(os.path.basename(wrapf))[0])
return directory, section['revision']
def get_wrap_subprojects(srcdir, gst_branch): def get_wrap_subprojects(srcdir, gst_branch):
''' '''