File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,4 +34,3 @@ sh_binary(
3434 srcs = ["qnxsoftwarecenter_clt.sh" ],
3535 visibility = ["//visibility:private" ],
3636)
37-
Original file line number Diff line number Diff line change 11"""Bazel module extension for QNX repositories."""
22
3- load ("//:qnx_install.bzl" , "qnx_software_center_repository" )
43load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_file" )
4+ load ("//:qnx_install.bzl" , "qnx_software_center_repository" )
55
66def _qnx_repositories_impl (module_ctx ):
77 """Implementation of the QNX repositories extension."""
8-
8+
99 # Download the QNX installer
1010 http_file (
1111 name = "qnx_installer" ,
1212 url = "https://www.qnx.com/download/download/79441/qnx-setup-2.0.4-202501021438-linux.run" ,
1313 executable = True ,
1414 downloaded_file_path = "qnx-setup-2.0.4-202501021438-linux.run" ,
1515 )
16-
16+
1717 # Create the QNX Software Center repository
1818 qnx_software_center_repository (
1919 name = "qnx_software_center" ,
@@ -22,4 +22,4 @@ def _qnx_repositories_impl(module_ctx):
2222
2323qnx_repositories = module_extension (
2424 implementation = _qnx_repositories_impl ,
25- )
25+ )
Original file line number Diff line number Diff line change 22
33def _qnx_software_center_repository_impl (repository_ctx ):
44 """Implementation of the QNX Software Center repository rule."""
5-
5+
66 installer_label = repository_ctx .attr .installer
77 install_dir = repository_ctx .path ("qnx_software_center" )
8-
8+
99 # Check if QNX Software Center is already installed
1010 qnxsoftwarecenter_clt = repository_ctx .path ("qnxsoftwarecenter/qnxsoftwarecenter_clt" )
11-
11+
1212 if not qnxsoftwarecenter_clt .exists :
1313 # Download/symlink the installer file
1414 installer_path = repository_ctx .path (installer_label )
15-
15+
1616 # Make installer executable
1717 repository_ctx .execute (["chmod" , "+x" , str (installer_path )])
18-
18+
1919 # Run the installer
2020 result = repository_ctx .execute (
2121 [
2222 str (installer_path ),
23- "--nox11" ,
23+ "--nox11" ,
2424 "force-override disable-auto-start agree-to-license-terms" ,
2525 "disable-auto-start" ,
2626 "agree-to-license-terms" ,
@@ -32,7 +32,7 @@ def _qnx_software_center_repository_impl(repository_ctx):
3232
3333 if result .return_code != 0 :
3434 fail ("Failed to extract QNX Software Center: %s\n Stderr: %s" % (result .stdout , result .stderr ))
35-
35+
3636 # Create a BUILD file that exports the qnxsoftwarecenter_clt binary
3737 # Note: The installer extracts to ./qnxsoftwarecenter (not qnx_software_center/qnxsoftwarecenter)
3838 repository_ctx .file ("BUILD" , """
You can’t perform that action at this time.
0 commit comments