#!/usr/bin/env python3
-# Copyright (C) 2018-2025 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2018-2026 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
env['DEBIAN_FRONTEND'] = 'noninteractive'
cmd = 'sudo apt install --no-install-recommends -y'
elif system == 'freebsd':
- cmd = 'sudo pkg clean --all --yes; sudo pkg install --no-repo-update --yes'
- cmd2 = 'sudo pkg clean --all --yes; sudo pkg install --yes' # with repo update
+ cmd = 'sudo pkg install --no-repo-update --yes'
+ cmd2 = 'sudo pkg install --yes' # with repo update
elif system == 'alpine':
cmd = 'sudo apk add'
elif system == 'arch':
else:
raise NotImplementedError('no implementation for %s' % system)
+ pkgs_str = ' '.join(pkgs)
+ if system == 'freebsd':
+ execute(f'sudo pkg fetch --dependencies --yes {pkgs_str}')
+
if one_package_at_a_time:
for p in pkgs:
exit_code, _ = execute(
)
else:
- pkgs = ' '.join(pkgs)
exit_code, _ = execute(
- f"{cmd} {pkgs}",
+ f"{cmd} {pkgs_str}",
timeout=timeout,
env=env,
check_times=check_times,
)
if exit_code != 0 and cmd2 is not None:
execute(
- f"{cmd2} {pkgs}",
+ f"{cmd2} {pkgs_str}",
timeout=timeout,
env=env,
check_times=check_times,
# prepare freebsd
elif system == 'freebsd':
packages.extend(['bash', 'boost-libs', 'botan3', 'coreutils', 'git', 'log4cplus', 'openssl', 'ninja'])
+ packages.append('pcre2') # dependency of git
deferred_functions.append(lambda: install_meson(only='meson'))
if 'docs' in features: