Repository: bigtop Updated Branches: refs/heads/master 9a85ba9e8 -> 46aa0fb24
BIGTOP-2201: Fix BIGTOP-2200 again Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/46aa0fb2 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/46aa0fb2 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/46aa0fb2 Branch: refs/heads/master Commit: 46aa0fb243851cd4cfbe0029efcc658ad089350f Parents: 9a85ba9 Author: Olaf Flebbe <[email protected]> Authored: Wed Dec 30 12:25:03 2015 +0100 Committer: Olaf Flebbe <[email protected]> Committed: Wed Dec 30 12:46:48 2015 +0100 ---------------------------------------------------------------------- bigtop_toolchain/manifests/protobuf.pp | 30 ++++++++++------------------- 1 file changed, 10 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/46aa0fb2/bigtop_toolchain/manifests/protobuf.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp index 9794509..110878c 100644 --- a/bigtop_toolchain/manifests/protobuf.pp +++ b/bigtop_toolchain/manifests/protobuf.pp @@ -30,29 +30,19 @@ class bigtop_toolchain::protobuf { case $operatingsystem{ /Ubuntu|Debian/: { - exec { "/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb": - cwd => "/usr/src", - creates => "/usr/src/libprotobuf8_2.5.0-9ubuntu1_$arch.deb", - } - exec { "/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb": - cwd => "/usr/src", - creates => "/usr/src/libprotoc8_2.5.0-9ubuntu1_$arch.deb", - } - exec { "/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb": - cwd => "/usr/src", - creates => "/usr/src/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb", - } - exec {"/usr/bin/dpkg -i protobuf-compiler_2.5.0-9ubuntu1_$arch.deb": - cwd => "/usr/src", - require => [ EXEC["/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb"] ] - } - exec {"/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb": + $libprotobuf8 = "libprotobuf8_2.5.0-9ubuntu1_$arch.deb" + $libprotoc8 = "libprotoc8_2.5.0-9ubuntu1_$arch.deb" + $protobuf_compiler = "protobuf-compiler_2.5.0-9ubuntu1_$arch.deb" + + exec { "download protobuf": cwd => "/usr/src", - require => [ EXEC["/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb"] ] + command => "/usr/bin/curl -L $url/$libprotobuf8 -o $libprotobuf8; /usr/bin/curl -L $url/$libprotoc8 -o $libprotoc8; /usr/bin/curl -L $url/$protobuf_compiler -o $protobuf_compiler", + creates => [ "/usr/src/$libprotobuf8", "/usr/src/$libprotoc8", "/usr/src/$protobuf_compiler" ] } - exec {"/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb": + exec { "install protobuf": cwd => "/usr/src", - require => EXEC["/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb"], + command => "/usr/bin/dpkg -i $libprotobuf8 $libprotoc8 $protobuf_compiler", + require => EXEC["download protobuf"], } } default: {
