aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2014-04-18 16:26:41 +0000
committerPascal Terjan <pterjan@gmail.com>2014-04-18 16:26:41 +0000
commit71aa10fb0929bb606ba32272b5a32a9d03e993e8 (patch)
treede125967fdc3db38be15c22e33a3553cc47e1846
parent601e280ce6380636a56974afc57bb44d88e0ba1c (diff)
downloadmga-youri-submit-71aa10fb0929bb606ba32272b5a32a9d03e993e8.tar
mga-youri-submit-71aa10fb0929bb606ba32272b5a32a9d03e993e8.tar.gz
mga-youri-submit-71aa10fb0929bb606ba32272b5a32a9d03e993e8.tar.bz2
mga-youri-submit-71aa10fb0929bb606ba32272b5a32a9d03e993e8.tar.xz
mga-youri-submit-71aa10fb0929bb606ba32272b5a32a9d03e993e8.zip
Fix generation of .deps
-rw-r--r--lib/Youri/Submit/Action/Dependencies.pm8
-rw-r--r--lib/Youri/Submit/Action/RebuildPackage.pm2
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;
}