summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-16 19:23:09 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-16 19:23:09 +0000
commitefeb12af68dc9ae8d4affb96d37872d1911cdd48 (patch)
treeafe6159eff974ebd541cec88480f898662dae788
parent0977b0a95e548a8ebc69a3a31bd3616c8a1fdfa5 (diff)
downloaddraklive-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-xdraklive4
1 files changed, 3 insertions, 1 deletions
diff --git a/draklive b/draklive
index 2947a3c..e8f4f3c 100755
--- a/draklive
+++ b/draklive
@@ -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, $_);
}