From 305c754d66a1dce55526c582848555213e1617ad Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Tue, 30 Aug 2016 00:21:26 +0200 Subject: SBO::Lib::Build: perform_sbo should change back from the SBo dir after building --- SBO-Lib/lib/SBO/Lib/Build.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'SBO-Lib/lib/SBO/Lib/Build.pm') diff --git a/SBO-Lib/lib/SBO/Lib/Build.pm b/SBO-Lib/lib/SBO/Lib/Build.pm index 2a39ee6..519d4b1 100644 --- a/SBO-Lib/lib/SBO/Lib/Build.pm +++ b/SBO-Lib/lib/SBO/Lib/Build.pm @@ -17,6 +17,7 @@ use File::Copy; # copy() and move() use File::Path qw/ make_path remove_tree /; use File::Temp qw/ tempdir tempfile /; use Tie::File; +use Cwd; our @EXPORT_OK = qw{ do_convertpkg @@ -486,8 +487,10 @@ sub perform_sbo { return $fail, undef, $exit if $exit; # run the slackbuild, grab its exit status, revert our changes + my $cwd = getcwd(); chdir $location; my ($out, $ret) = run_tee($cmd); + chdir $cwd; revert_slackbuild("$location/$sbo.SlackBuild"); # return error now if the slackbuild didn't exit 0 -- cgit v1.2.3