From 71aa10fb0929bb606ba32272b5a32a9d03e993e8 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 18 Apr 2014 16:26:41 +0000 Subject: Fix generation of .deps --- lib/Youri/Submit/Action/Dependencies.pm | 8 +++++--- 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; } -- cgit v1.2.1