Skip to content

Commit

Permalink
Jenkins: Work around autotools/CMake adding /usr with prefix=/
Browse files Browse the repository at this point in the history
This is used by e.g. LLVM jobs to install directly to tarball/ without
any additional subdirectories, but the latest refactoring broke this.
  • Loading branch information
arichardson committed Aug 9, 2023
1 parent 7d68314 commit f643e97
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pycheribuild/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,14 @@ def _jenkins_main() -> None:
# noinspection PyProtectedMember
project = target._get_or_create_project_no_setup(None, cheri_config, caller=None)
if isinstance(project, Project):
project._install_prefix = cheri_config.installation_prefix
project.destdir = cheri_config.output_root
# Using "/" as the install prefix results inconsistently prefixing some paths with '/usr/'.
# To avoid this, just use the full install path as the prefix.
if cheri_config.installation_prefix == Path("/"):
project._install_prefix = expected_install_path
project.destdir = None
else:
project._install_prefix = cheri_config.installation_prefix
project.destdir = cheri_config.output_root
assert project.real_install_root_dir == expected_install_path
for tgt in cheri_config.targets:
build_target(cheri_config, target_manager.get_target_raw(tgt))
Expand Down

0 comments on commit f643e97

Please sign in to comment.