Skip to content

Commit

Permalink
Add additional package repository
Browse files Browse the repository at this point in the history
Allow the user to specify additonal package repository
when bootstrapping.

Signed-off-by: Charles Short <[email protected]>
  • Loading branch information
Charles Short committed Mar 28, 2024
1 parent 06c7c27 commit 2b815a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ruck/stages/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import logging
import os
import shutil

from ruck.config import get_config
Expand Down Expand Up @@ -49,6 +50,12 @@ def run(self):
packages = get_config(self.config, "options.packages")
if packages:
cmd.extend([f"--include={', '.join(packages)}"])

repo = get_config(self.config, "options.repo")
if repo:
if not os.path.isfile(repo) and not os.path.exists():
raise exceptions.ConfigError(
"Repo configuration is not a file")
customize_hooks = get_config(self.config, "options.customize_hooks")
if customize_hooks:
cmd.extend([f"--customize-hook={hook}"
Expand Down Expand Up @@ -90,6 +97,9 @@ def run(self):
target = self.workspace.joinpath(
get_config(self.config, "options.target"))
cmd.extend([suite, target])
if repo is not None:
# include our mirror from the manifest.
cmd.extend([suite])
utils.run_command(cmd)

def post_install(self):
Expand Down

0 comments on commit 2b815a1

Please sign in to comment.