From 10fc9524d6dd0c0b4a903b10cb036f415b307d36 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 2 Apr 2018 21:04:04 +0100 Subject: Don't create loopback file for excluded files. What's the point - it's never used. --- lib/MGA/DrakISO/BuildLoop.pm | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'lib/MGA') diff --git a/lib/MGA/DrakISO/BuildLoop.pm b/lib/MGA/DrakISO/BuildLoop.pm index e325d09..8a83e03 100644 --- a/lib/MGA/DrakISO/BuildLoop.pm +++ b/lib/MGA/DrakISO/BuildLoop.pm @@ -49,7 +49,7 @@ sub build_live_loopback_files { # make sure no external filesystems are mounted before creating the loopback umount_all_in_root($root); - my @excluded_files = expand_file_list($build, @{$build->{loopbacks}{exclude}{files} || []}); + my @excluded_files = expand_file_list($build, @{$build->{loopbacks}{exclude} || []}); my @modules_files = expand_file_list($build, @{$build->{loopbacks}{modules} || []}); foreach (grep { exists $loop_types{$_->{type}}{build} } @{$build->{mount}{dirs} || []}) { @@ -65,26 +65,6 @@ sub build_live_loopback_files { $loop->{build}->($build, { path => "/modules/$module->{name}", root => $copy_tree, exclude => \@excluded_files }); run_as_root('rm', '-rf', $copy_tree); } - - if (@excluded_files) { - my $excluded_tree = $root . "/tmp/draklive/excluded/all"; - eval { rm_rf($excluded_tree) }; - hardlink_filtered($root, $excluded_tree, \@excluded_files); - - foreach my $module (list_loopback_modules($build)) { - my $copy_tree = $root . "/tmp/draklive/excluded/$module->{name}"; - run_as_root('rm', '-rf', $copy_tree); - hardlink_filtered($excluded_tree, $copy_tree, $module->{files}); - my $loop = $loop_types{$module->{type}}; - $loop->{build}->($build, { path => "/modules/excluded-$module->{name}", root => $copy_tree }); - run_as_root('rm', '-rf', $copy_tree); - } - - my $loop = $loop_types{$build->{loopbacks}{exclude}{type}}; - $loop->{build}->($build, { path => "/excluded", root => $excluded_tree, exclude => \@modules_files }); - - run_as_root('rm', '-rf', $excluded_tree); - } } sub expand_file_list { -- cgit v1.2.1