Skip to content

Commit

Permalink
[backend] Make bs_worker aware of pvm backend
Browse files Browse the repository at this point in the history
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
  • Loading branch information
Dinar Valeev authored and adrianschroeter committed May 11, 2016
1 parent d5673ee commit a293bb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions dist/obsworker
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ case "$1" in
if [ "--kvm" == "$vmopt" ]; then echo "KVM virtual machine"
elif [ "--xen" == "$vmopt" ]; then echo "XEN virtual machine"
elif [ "--zvm" == "$vmopt" ]; then echo "z/VM virtual machine"
elif [ "--pvm" == "$vmopt" ]; then echo "PowerVM LPAR"
elif [ "--emulator" == "$vmopt" ]; then echo "System emulated virtual machine"
else echo "chroot"
fi
Expand Down
10 changes: 6 additions & 4 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ Usage: $0 [OPTION] --root <directory> --statedir <directory>
--kvm : enable kvm
--pvm : enable pvm
--xen : enable xen
--lxc : enable lxc
Expand Down Expand Up @@ -395,7 +397,7 @@ while (@ARGV) {
$testmode = 1;
next;
}
if ($ARGV[0] =~ /^--(kvm|xen|lxc|emulator|zvm|docker)$/) {
if ($ARGV[0] =~ /^--(kvm|xen|lxc|emulator|zvm|docker|pvm)$/) {
$vm = "--$1";
shift @ARGV;
next;
Expand Down Expand Up @@ -651,7 +653,7 @@ my $workerinfo = {};
$workerinfo->{'hostlabel'} = \@hostlabel if @hostlabel;
# sandbox
$workerinfo->{'sandbox'} = 'chroot';
$workerinfo->{'sandbox'} = $1 if $vm =~ /(xen|kvm|emulator|lxc|zvm|docker)/;
$workerinfo->{'sandbox'} = $1 if $vm =~ /(xen|kvm|emulator|lxc|zvm|docker|pvm)/;
# build host owner
$workerinfo->{'owner'} = $owner if $owner;
# linux kernel
Expand Down Expand Up @@ -2716,7 +2718,7 @@ sub dobuild {
}

push @args, "$statedir/build/build";
if ($vm =~ /(xen|kvm|zvm|emulator)/) {
if ($vm =~ /(xen|kvm|zvm|emulator|pvm)/) {
mkdir("$buildroot/.mount") unless -d "$buildroot/.mount";
push @args, '--root', "$buildroot/.mount";
if ($vm =~ /emulator/) {
Expand Down Expand Up @@ -2808,7 +2810,7 @@ sub dobuild {
return 1;
}

if ($vm =~ /(xen|kvm|zvm|emulator)/) {
if ($vm =~ /(xen|kvm|zvm|emulator|pvm)/) {
rm_rf("$buildroot/.build.packages");
# move directory with extracted build results
if(!rename("$buildroot/.mount/.build.packages", "$buildroot/.build.packages")) {
Expand Down

0 comments on commit a293bb1

Please sign in to comment.