summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/Loopback.pm25
1 files changed, 9 insertions, 16 deletions
diff --git a/lib/MGA/DrakISO/Loopback.pm b/lib/MGA/DrakISO/Loopback.pm
index ed8cba7..c86f798 100644
--- a/lib/MGA/DrakISO/Loopback.pm
+++ b/lib/MGA/DrakISO/Loopback.pm
@@ -3,9 +3,10 @@ package MGA::DrakISO::Loopback;
use strict;
use MDK::Common;
+
use File::Temp;
+
use MGA::DrakISO::Mounts;
-use MGA::DrakISO::Progress;
use MGA::DrakISO::Utils;
use Exporter;
@@ -28,25 +29,17 @@ our %loop_types;
my $src = $root . $dir->{build_from};
my $total = directory_usage($src);
print "have to process " . int($total/1000000) . " MB\n";
- my $progress = MGA::DrakISO::Progress->new($total, time(), 6);
my $exclude_file = tmpnam();
output_p($exclude_file, map { $root . "$_\n" } grep { -e $root . $_ } @{$dir->{exclude} || []});
my $sort = $live->{settings}{config_root} . '/' . $dir->{sort};
my $squashfs4_comp = best_squashfs4_compression($live);
- run_foreach(sub {
- if (/^mksquashfs: file .*, uncompressed size (\d+) bytes\s*(?:DUPLICATE|LINK)?$/) {
- $progress->{current} += $1;
- $progress->show(time());
- }
- },
- $squashfs4_comp ? 'mksquashfs' : 'mksquashfs3', $src, $dest,
- $squashfs4_comp ? ('-comp', $squashfs4_comp) : '-lzma',
- '-noappend', '-no-progress', '-info', '-b', '1048576',
- #'-processors', 1,
- '-ef', $exclude_file,
- if_(-f $sort, '-sort', $sort),
- ) or die "unable to run mksquashfs\n";
- $progress->end;
+ run_($squashfs4_comp ? 'mksquashfs' : 'mksquashfs3', $src, $dest,
+ $squashfs4_comp ? ('-comp', $squashfs4_comp) : '-lzma',
+ '-noappend', '-b', '1048576',
+ #'-processors', 1,
+ '-ef', $exclude_file,
+ if_(-f $sort, '-sort', $sort),
+ ) or die "unable to run mksquashfs\n";
unlink $exclude_file;
},
mount => sub {