From: Joachim Breitner Date: Fri, 24 Jul 2009 14:39:48 +0000 (+0200) Subject: Copy, not move, when commiting a transaction X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ea08ef45d19c73b322b1343a2a199820de66b004;p=wannabuild.git Copy, not move, when commiting a transaction A move would destroy the file owner permissions, which must not happen with wanna-build. --- diff --git a/bin/wanna-build b/bin/wanna-build index 8a9352f..0762a23 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -336,8 +336,10 @@ if ($op_mode eq "start-transaction") { } if ($op_mode eq "commit-transaction") { - move ( db_filename_transaction( $distribution ), db_filename_master( $distribution )) - or die "Move failed: $!"; + # we need to copy here to preserve the owner and group of the file + copy ( db_filename_transaction( $distribution ), db_filename_master( $distribution )) + or die "Copy failed: $!"; + unlink db_filename_transaction( $distribution ); open TLOG, "<", db_transactlog_transaction( $distribution ) or die "Could not open logfile from transaction: $!"; open LOG, ">>", db_transactlog_master( $distribution )