diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-05-16 19:23:09 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-05-16 19:23:09 +0000 |
commit | efeb12af68dc9ae8d4affb96d37872d1911cdd48 (patch) | |
tree | afe6159eff974ebd541cec88480f898662dae788 | |
parent | 0977b0a95e548a8ebc69a3a31bd3616c8a1fdfa5 (diff) | |
download | draklive-efeb12af68dc9ae8d4affb96d37872d1911cdd48.tar draklive-efeb12af68dc9ae8d4affb96d37872d1911cdd48.tar.gz draklive-efeb12af68dc9ae8d4affb96d37872d1911cdd48.tar.bz2 draklive-efeb12af68dc9ae8d4affb96d37872d1911cdd48.tar.xz draklive-efeb12af68dc9ae8d4affb96d37872d1911cdd48.zip |
create loopbacks directory in indivual build functions and not on top directory (they may have to create subdirs anyway)
-rwxr-xr-x | draklive | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -186,6 +186,7 @@ my %loop = ( build => sub { my ($live, $dir) = @_; my $dest = get_builddir($live) . $live->{prefix}{build}{loopbacks} . '/' . $dir->{location}; + mkdir_p(dirname($dest)); my $root = get_system_root($live) . $dir->{build_from}; my $total = directory_usage($root); print "have to process " . int($total/1000000) . " MB\n"; @@ -220,6 +221,7 @@ my %loop = ( build => sub { my ($live, $dir) = @_; my $dest = get_builddir($live) . $live->{prefix}{build}{loopbacks} . '/' . $dir->{location}; + mkdir_p(dirname($dest)); device_allocate_fs($dest, $dir->{pre_allocate}); device_mkfs($dest, $dir->{fs}) if !defined $dir->{min_size}; }, @@ -751,7 +753,7 @@ sub create_loopback_files { my ($live) = @_; # umount filesystem in the live before creating the loopback umount_external_filesystem($live); - mkdir_p(get_builddir($live) . $live->{prefix}{build}{loopbacks}); + foreach (grep { exists $loop{$_->{type}}{build} } @{$live->{mount}{dirs} || []}) { $loop{$_->{type}}{build}->($live, $_); } |