From 0fd93f5d32ce103a19a4ecbf9b7e0cf7efb6da4c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 16 May 2007 20:23:57 +0000 Subject: use hardlink_filtered to build excluded files tarball --- draklive | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/draklive b/draklive index d96f120..f088e80 100755 --- a/draklive +++ b/draklive @@ -779,12 +779,15 @@ sub create_loopback_files { } if (@excluded_files) { - my $exclude_file = tmpnam(); - output_p($exclude_file, map { s|^/||; "$_\n"; } @excluded_files); + my $excluded_tree = get_system_root($live) . "/tmp/draklive/excluded/all"; + eval { rm_rf($excluded_tree) }; + hardlink_filtered(get_system_root($live), $excluded_tree, \@excluded_files); + mkdir_p(get_builddir($live) . $live->{prefix}{build}{tarballs}); - run_('tar', 'cj', '-C', get_system_root($live), '-T', $exclude_file, - '-f', get_builddir($live) . $live->{prefix}{build}{tarballs} . "/excluded.tar.bz2"); - unlink $exclude_file; + run_('tar', 'cjf', get_builddir($live) . $live->{prefix}{build}{tarballs} . "/excluded.tar.bz2", + '-C', $excluded_tree, '.'); + + eval { rm_rf($excluded_tree) }; } } -- cgit v1.2.1