|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH v19 09/20] osstest: add support for the FreeBSD package manager
From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
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>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v19: Rework on top of target_run_pkgmanager_install
Changes since v6:
- Use $ho->{Os} in order to detect the target OS.
Changes since v5:
- Add prototype for package_install_cmd.
- Use $ho->{Ident} instead of hardcoding "host" in get_hostflags.
Changes since v4:
- Unify more code between FreeBSD and Debian: introduce an
OS-agnostic package_install_cmd to generate the install cmd.
Changes since v3:
- New in this version.
---
Osstest/TestSupport.pm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 0ac41e2..e113a27 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -530,11 +530,15 @@ sub target_putfile_root ($$$$;$) {
sub target_run_pkgmanager_install ($$;$$) {
my ($ho, $packageslist, $norec, $force) = @_;
my @cmd;
- push @cmd, qw(DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y
- with-lock-ex -w /var/lock/osstest-apt apt-get);
- push @cmd, qw(-f) if $force;
- push @cmd, qw(--no-install-recommends) if $norec;
- push @cmd, qw(-y install);
+ if ($ho->{OS} eq "freebsd") {
+ push @cmd, qw(lockf /var/run/osstest-pkg-lock pkg-static install);
+ } else {
+ push @cmd, qw(DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y
+ with-lock-ex -w /var/lock/osstest-apt apt-get);
+ push @cmd, qw(-f) if $force;
+ push @cmd, qw(--no-install-recommends) if $norec;
+ push @cmd, qw(-y install);
+ }
push @cmd, @$packagelist;
target_cmd_root($ho, "@cmd", 3000);
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |