openbsd-ports/sysutils/p5-Rex/patches/patch-lib_Rex_Pkg_Base_pm
afresh1 b6ce9db3d1 Import sysutils/p5-Rex
a command line tool which executes commands on remote servers. Define
tasks in Perl and execute them on remote servers or groups of servers.
Rex can be used to:
  _ Deploy web applications to servers sequentially or in parallel.
  _ Automate common tasks.
  _ Provision servers using Rex's builtin tools.

From Olivier Cherrier <oc AT symacx.com>
with tweaks from sthen@
2019-02-21 04:54:50 +00:00

23 lines
696 B
Plaintext

$OpenBSD: patch-lib_Rex_Pkg_Base_pm,v 1.1.1.1 2019/02/21 04:54:50 afresh1 Exp $
Index: lib/Rex/Pkg/Base.pm
--- lib/Rex/Pkg/Base.pm.orig
+++ lib/Rex/Pkg/Base.pm
@@ -63,6 +63,7 @@ sub update {
my ( $self, $pkg, $option ) = @_;
my $version = $option->{'version'} || '';
+ my $env = $option->{'env'} || ();
Rex::Logger::debug( "Installing $pkg" . ( $version ? "-$version" : "" ) );
my $cmd = sprintf $self->{commands}->{install}, $pkg;
@@ -72,7 +73,7 @@ sub update {
$option->{version};
}
- my $f = i_run $cmd, fail_ok => 1;
+ my $f = i_run $cmd, fail_ok => 1, env => $env;
unless ( $? == 0 ) {
Rex::Logger::info( "Error installing $pkg.", "warn" );