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.
This commit is contained in:
Nicolas Dufresne 2019-05-06 16:07:28 -04:00
parent 7fb7739337
commit a769bf6c6e

View file

@ -117,6 +117,8 @@ def get_subprocess_env(options, gst_version):
for target in targets: for target in targets:
filenames = listify(target['filename']) filenames = listify(target['filename'])
for filename in filenames: for filename in filenames:
if filename.startswith(options.sysroot):
filename = filename[len(options.sysroot):]
root = os.path.dirname(filename) root = os.path.dirname(filename)
if srcdir_path / "subprojects/gst-devtools/validate/plugins" in (srcdir_path / root).parents: if srcdir_path / "subprojects/gst-devtools/validate/plugins" in (srcdir_path / root).parents:
continue continue
@ -227,6 +229,9 @@ if __name__ == "__main__":
parser.add_argument("--srcdir", parser.add_argument("--srcdir",
default=SCRIPTDIR, default=SCRIPTDIR,
help="The top level source directory") 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() options, args = parser.parse_known_args()
if not os.path.exists(options.builddir): if not os.path.exists(options.builddir):