aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-22 13:41:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-22 13:41:27 +0000
commit33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6 (patch)
tree1bba0b512ab4eeb4dabd2bc6c5a18b6ccb033811 /lib/Youri
parentbb4107531e80cce8850dc906d9bc9b25d4e7c4cc (diff)
downloadmga-youri-submit-33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6.tar
mga-youri-submit-33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6.tar.gz
mga-youri-submit-33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6.tar.bz2
mga-youri-submit-33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6.tar.xz
mga-youri-submit-33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6.zip
more atomic generation of MD5SUM
Diffstat (limited to 'lib/Youri')
-rw-r--r--lib/Youri/Submit/Post/Genhdlist2.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Youri/Submit/Post/Genhdlist2.pm b/lib/Youri/Submit/Post/Genhdlist2.pm
index 6eefd7c..e9c3e24 100644
--- a/lib/Youri/Submit/Post/Genhdlist2.pm
+++ b/lib/Youri/Submit/Post/Genhdlist2.pm
@@ -52,9 +52,12 @@ sub run {
# need to redo global MD5SUM. This MD5SUM is mostly obsolete, but is still needed up to 2007.1
# (and even on cooker for existing urpmi.cfg)
foreach my $arch (@{$repository->get_arch_changed($target)}) {
- my $cmd = "cd $root/$target/$arch/media/media_info ; time md5sum hdlist_* synthesis.* > MD5SUM";
+ my $dir = "$root/$target/$arch/media/media_info";
+ my $cmd = "cd $dir ; time md5sum hdlist_* synthesis.*";
print "$cmd\n";
- system($cmd) == 0 or print "ERROR: $cmd failed\n";
+ my $m = `$cmd`;
+ open my $f, '>', "$dir/MD5SUM" or die "Can't write $dir/MD5SUM: $!\n";
+ print $f $m;
}
return;
}