aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri/Submit/Action/Install.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Youri/Submit/Action/Install.pm')
-rw-r--r--lib/Youri/Submit/Action/Install.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Youri/Submit/Action/Install.pm b/lib/Youri/Submit/Action/Install.pm
index c6ce573..c26ec47 100644
--- a/lib/Youri/Submit/Action/Install.pm
+++ b/lib/Youri/Submit/Action/Install.pm
@@ -43,11 +43,17 @@ sub run {
unless ($self->{_test}) {
# create destination dir if needed
- system("install -d -m " . ($self->{_perms} + 111) . " $dest")
- unless -d $dest;
+ if (! -d $dest) {
+ my $status =
+ system("install -d -m " . ($self->{_perms} + 111) . " $dest");
+ croak "Unable to create directory $dest: $?" if $status;
+ }
# install file to new location
- system("install -m $self->{_perms} $file $dest/$rpm");
+ my $status =
+ system("install -m $self->{_perms} $file $dest");
+ croak "Unable to install file $file to $dest: $?" if $status;
+
my $arch = $package->get_arch();
$repository->set_arch_changed($target, $arch);
$repository->set_install_dir_changed($dest);