Skip to content
Snippets Groups Projects
Unverified Commit 0a47c75f authored by boklm's avatar boklm
Browse files

Bug 40062: Avoid using run_chroot in copy_file_to

When copying files to a container directory, we were running `chown` on
the files using run_chroot, which in addition to using the chroot
command is doing other things like setting up mount points and other
things not needed for running `chown`. Simply using `chroot` should be
enough and faster.
parent 063c41f9
Branches bug_40062
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ sub copy_file_to {
my $filename = fileparse($src);
rcopy($src, "$rootfsdir/$dst/$filename")
or exit_error "Failed to copy $src to $rootfsdir/$dst/$filename";
return run_chroot($rootfsdir, ['chown', '-R', $owner, $dst]);
return system('/usr/sbin/chroot', $rootfsdir, 'chown', '-R', $owner, $dst);
}
sub copy_file_from {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment