diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-09-22 22:48:22 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-09-22 22:52:25 +0530 |
commit | e9eb4c0a478e60599deb0adb7456e8132bc92618 (patch) | |
tree | c4e87b474ca72378d7149cc271f50f817872bd88 | |
parent | 42b576632843f26c4670769852859a0d2f4848fa (diff) |
cache: Use the build platform to decide when to relocate
Relocation is needed when we don't build pkg-config with
--enable-define-prefix. Relocation was already broken on macOS and
Windows because self.build_dir is hard-coded to /builds/... which is
wrong on macOS ($HOME/builds/...) and Windows (C:/builds/...).
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/612>
-rw-r--r-- | cerbero/commands/cache.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cerbero/commands/cache.py b/cerbero/commands/cache.py index f2a64c88..0a1aa633 100644 --- a/cerbero/commands/cache.py +++ b/cerbero/commands/cache.py @@ -147,12 +147,12 @@ class FetchCache(BaseCache): m.warning("Corrupted dependency file, ignoring.") os.remove(dep_path) - # Don't need to relocate on Windows since binaries in the prefix - # are meant to be used in a relocatable manner. In case this needs - # to be re-enabled at some point, note that the current - # self.build_dir value is an absolute path, and should instead be - # derived from CI env vars. - if config.target_platform != Platform.WINDOWS: + # Don't need to relocate on Windows and macOS since we build + # pkg-config with --enable-define-prefix. + # In case this needs to be re-enabled at some point, note that the + # current self.build_dir value is hard-coded and is wrong on macOS + # and Windows. It should instead be derived from CI env vars. + if config.platform == Platform.LINUX: origin = self.build_dir % namespace m.message("Relocating from %s to %s" % (origin, config.home_dir)) # FIXME: Just a quick hack for now |