From a769bf6c6e974bae804bcbb2ffa45b2e7ea668ca Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 6 May 2019 16:07:28 -0400 Subject: [PATCH] uninstalled: Add an option to strip off the sysroot path As the data from meson is no longer relative path, it is not longer possible to move gst-build around and run gst-uninstalled.py. This broke cross-compilation usage, where you build on a host and run over NFS on target. This adds an option to tell the script to strip off the host path to the sysroot. --- gst-uninstalled.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst-uninstalled.py b/gst-uninstalled.py index 78c5ec1188..5b6003973d 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -117,6 +117,8 @@ def get_subprocess_env(options, gst_version): for target in targets: filenames = listify(target['filename']) for filename in filenames: + if filename.startswith(options.sysroot): + filename = filename[len(options.sysroot):] root = os.path.dirname(filename) if srcdir_path / "subprojects/gst-devtools/validate/plugins" in (srcdir_path / root).parents: continue @@ -227,6 +229,9 @@ if __name__ == "__main__": parser.add_argument("--srcdir", default=SCRIPTDIR, help="The top level source directory") + parser.add_argument("--sysroot", + default='', + help="The sysroot path used during cross-compilation") options, args = parser.parse_known_args() if not os.path.exists(options.builddir):