[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 08/16] osstest: add support for the FreeBSD package manager
FreeBSD support is added to target_install_packages and target_install_packages_norec, although there's no equivalent to the --no-install-recommends in the FreeBSD package manager. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Changes since v3: - New in this version. --- Osstest/TestSupport.pm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 5a9a6f8b..94ace09c 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -529,13 +529,30 @@ sub target_run_apt { "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y \\ with-lock-ex -w /var/lock/osstest-apt apt-get @aptopts", 3000); } +sub target_run_pkg { + my ($ho, @aptopts) = @_; + target_cmd_root($ho,"lockf /var/run/osstest-pkg-lock pkg-static @aptopts", + 3000); +} sub target_install_packages { my ($ho, @packages) = @_; - target_run_apt($ho, qw(-y install), @packages); + my @hostflags = get_hostflags('host'); + + if (grep /^freebsd/i, @hostflags) { + target_run_pkg($ho, qw(install), @packages); + } else { + target_run_apt($ho, qw(-y install), @packages); + } } sub target_install_packages_norec { my ($ho, @packages) = @_; - target_run_apt($ho, qw(--no-install-recommends -y install), @packages); + my @hostflags = get_hostflags('host'); + + if (grep /^freebsd/i, @hostflags) { + target_run_pkg($ho, qw(install), @packages); + } else { + target_run_apt($ho, qw(--no-install-recommends -y install), @packages); + } } sub target_somefile_getleaf ($$$) { -- 2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |