diff options
Diffstat (limited to 'lib/Youri')
-rw-r--r-- | lib/Youri/Submit/Action/Dependencies.pm | 8 | ||||
-rw-r--r-- | lib/Youri/Submit/Action/RebuildPackage.pm | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Youri/Submit/Action/Dependencies.pm b/lib/Youri/Submit/Action/Dependencies.pm index b0cd2a1..106f601 100644 --- a/lib/Youri/Submit/Action/Dependencies.pm +++ b/lib/Youri/Submit/Action/Dependencies.pm @@ -44,13 +44,15 @@ sub run { return unless $define->{dependencies} =~ /^[\d,]+$/; - my $file = basename($package->as_file()); + my $file = $package->as_file(); my $dest = $repository->get_upload_dir($package, $target, $define); - my $depsfile = "$dest$file.deps"; + my $base = basename ($file); + $dest =~ s/\/[0-9]{14}\./\/*./; + my $deps = $define->{dependencies}; $deps =~ tr/,/\n/; - my $cmd = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} \"echo '$deps' > $depsfile\""; + my $cmd = "ssh -i $self->{_ssh_key} $self->{_user}\@$self->{_uphost} \"file=`echo $dest$base`; echo '$deps' > \\\$file.deps\""; print "Submit::Action::Dependencies: doing $cmd\n" if $self->{_verbose}; if (!$self->{_test}) { if (!system($cmd)) { diff --git a/lib/Youri/Submit/Action/RebuildPackage.pm b/lib/Youri/Submit/Action/RebuildPackage.pm index a2ba4b0..7b7b5d6 100644 --- a/lib/Youri/Submit/Action/RebuildPackage.pm +++ b/lib/Youri/Submit/Action/RebuildPackage.pm @@ -34,7 +34,7 @@ sub run { $package->is_source or return 1; my $prefix; - if ($package->get_file_name() =~ m/^(\d{14})\..*$/) { + if ($package->get_file_name() =~ m/^(\d{14}\..*)_/) { $prefix = $1; } |