summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-05-16 20:10:26 +0000
committerOlivier Blin <oblin@mandriva.com>2007-05-16 20:10:26 +0000
commit657ac2e0df08d1b4d28edcc5543030fef0145d85 (patch)
treed5dc4b8f10dedf871eeeda03d1b1045cb69ad5b8
parentbb12c6dc2922215d70175b840110660274bedb19 (diff)
downloaddraklive-657ac2e0df08d1b4d28edcc5543030fef0145d85.tar
draklive-657ac2e0df08d1b4d28edcc5543030fef0145d85.tar.gz
draklive-657ac2e0df08d1b4d28edcc5543030fef0145d85.tar.bz2
draklive-657ac2e0df08d1b4d28edcc5543030fef0145d85.tar.xz
draklive-657ac2e0df08d1b4d28edcc5543030fef0145d85.zip
pass excluded files list in loopback directory hash to allow refined exclusion
-rwxr-xr-xdraklive9
1 files changed, 6 insertions, 3 deletions
diff --git a/draklive b/draklive
index 0440d0f..ec6044f 100755
--- a/draklive
+++ b/draklive
@@ -194,7 +194,7 @@ my %loop = (
print "have to process " . int($total/1000000) . " MB\n";
my $progress = progress_start($total, time(), 6);
my $exclude_file = tmpnam();
- output_p($exclude_file, map { $root . "$_\n" } list_excluded_files($live));
+ output_p($exclude_file, map { $root . "$_\n" } grep { -e $root . $_ } @{$dir->{exclude} || []});
my $sort = $live->{settings}{config_root} . '/' . $dir->{sort};
run_foreach(sub {
if (/^mksquashfs: file .*, uncompressed size (\d+) bytes\s*(?:DUPLICATE|LINK)?$/) {
@@ -757,13 +757,16 @@ sub create_loopback_files {
# umount filesystem in the live before creating the loopback
umount_external_filesystem($live);
+ my @excluded_files = list_excluded_files($live);
+
foreach (grep { exists $loop{$_->{type}}{build} } @{$live->{mount}{dirs} || []}) {
+ local $_->{exclude} = [ @excluded_files ];
$loop{$_->{type}}{build}->($live, $_);
}
- if (my @excluded = list_excluded_files($live)) {
+ if (@excluded_files) {
my $exclude_file = tmpnam();
- output_p($exclude_file, map { s|^/||; "$_\n"; } @excluded);
+ output_p($exclude_file, map { s|^/||; "$_\n"; } @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");