summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/BuildRoot.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm
index 903a65e..177d5af 100644
--- a/lib/MGA/DrakISO/BuildRoot.pm
+++ b/lib/MGA/DrakISO/BuildRoot.pm
@@ -697,7 +697,7 @@ sub copy_to_root {
# TODO: support source files in remote repositories
- run_as_root('cp', '-af', @files, $root . $dest)
+ run_as_root('cp', '-af', '--no-preserve=ownership', @files, $root . $dest)
or die "ERROR: failed to copy file to $dest in Live system root\n";
return if !defined $mode;
@@ -711,10 +711,8 @@ sub output_to_root {
my $temp_file = tmpnam();
output($temp_file, map { "$_\n" } @text);
- chmod($mode, $temp_file) if $mode;
-
- run_as_root('mv', $temp_file, $root . $file)
- or die "ERROR: failed to write $file in Live system root\n";
+ copy_to_root($root, $file, $mode, $temp_file);
+ unlink($temp_file);
}
sub rm_in_root {