diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-18 21:42:42 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-12-18 21:42:42 +0000 |
commit | fce42d85023e9e0cbd3b7fbd98ff3b734814612a (patch) | |
tree | b255a11dd17092d853f345a28c37dde8fd497bcb /lib/MGA/DrakISO | |
parent | 45af27325ded155ab7ce4c76daedd053d9d504cc (diff) | |
download | drakiso-fce42d85023e9e0cbd3b7fbd98ff3b734814612a.tar drakiso-fce42d85023e9e0cbd3b7fbd98ff3b734814612a.tar.gz drakiso-fce42d85023e9e0cbd3b7fbd98ff3b734814612a.tar.bz2 drakiso-fce42d85023e9e0cbd3b7fbd98ff3b734814612a.tar.xz drakiso-fce42d85023e9e0cbd3b7fbd98ff3b734814612a.zip |
Use mksquashfs's built-in progress indicator.
The Progress module doesn't work, and is now redundant.
Diffstat (limited to 'lib/MGA/DrakISO')
-rw-r--r-- | lib/MGA/DrakISO/Loopback.pm | 25 |
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 { |