summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Tappe2007-03-13 00:20:40 +0100
committerOliver Tappe2007-03-13 00:20:40 +0100
commit6a7405ce4cdf6577ad0c7e9d70345585a6066412 (patch)
tree318fb94a3b8e5f77f08e0a2e9b3935a7660b7e83
parent* added an option to slurpFile() which causes it to not fail in case the requ... (diff)
downloadcore-6a7405ce4cdf6577ad0c7e9d70345585a6066412.tar.gz
core-6a7405ce4cdf6577ad0c7e9d70345585a6066412.tar.xz
core-6a7405ce4cdf6577ad0c7e9d70345585a6066412.zip
* moved the clone-filter around to make it actually work again.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@763 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--installer/OpenSLX/OSExport/Distro/Base.pm46
-rw-r--r--installer/OpenSLX/OSExport/Distro/SUSE_10_2.pm2
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Base.pm45
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm25
4 files changed, 59 insertions, 59 deletions
diff --git a/installer/OpenSLX/OSExport/Distro/Base.pm b/installer/OpenSLX/OSExport/Distro/Base.pm
index 36c214a1..36e73ca6 100644
--- a/installer/OpenSLX/OSExport/Distro/Base.pm
+++ b/installer/OpenSLX/OSExport/Distro/Base.pm
@@ -35,52 +35,6 @@ sub initialize
sub initDistroInfo
{
- my $self = shift;
-
- $self->{'clone-filter'} = "
- - *.bak
- - *.old
- - *lost+found*
- - *~
- - .*.cmd
- - .svn
- - /*
- + /bin
- + /boot
- + /dev
- - /dev/*
- + /etc
- - /etc/dxs
- - /etc/exports*
- - /etc/opt/openslx
- - /etc/resolv.conf.*
- - /etc/samba/secrets.tdb
- - /etc/shadow*
- - /etc/vmware/installer.sh
- + /home
- - /home/*
- + /lib
- + /lib64
- + /mnt
- - /mnt/*
- + /opt
- - /opt/openslx
- + /proc
- - /proc/*
- + /root
- - /root/*
- + /sbin
- + /sys
- - /sys/*
- + /tmp
- - /tmp/*
- + /usr
- - /usr/lib/vmware/modules/*
- + /var
- - /var/lib/vmware
- - /var/opt/openslx
- - /var/tmp/*
- ";
}
1;
diff --git a/installer/OpenSLX/OSExport/Distro/SUSE_10_2.pm b/installer/OpenSLX/OSExport/Distro/SUSE_10_2.pm
index 60ee21a4..da3f0aaf 100644
--- a/installer/OpenSLX/OSExport/Distro/SUSE_10_2.pm
+++ b/installer/OpenSLX/OSExport/Distro/SUSE_10_2.pm
@@ -40,8 +40,6 @@ sub initDistroInfo
{
my $self = shift;
- $self->SUPER::initDistroInfo();
-
$self->{'export-filter'} = "
- *.YaST2save
- *.o
diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm
index 73235c53..493a7c67 100644
--- a/installer/OpenSLX/OSSetup/Distro/Base.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Base.pm
@@ -53,6 +53,51 @@ sub initialize
$self->{'stage1c-faked-files'} = [
];
+ $self->{'clone-filter'} = "
+ - *.bak
+ - *.old
+ - *lost+found*
+ - *~
+ - .*.cmd
+ - .svn
+ - /*
+ + /bin
+ + /boot
+ + /dev
+ - /dev/*
+ + /etc
+ - /etc/dxs
+ - /etc/exports*
+ - /etc/opt/openslx
+ - /etc/resolv.conf.*
+ - /etc/samba/secrets.tdb
+ - /etc/shadow*
+ - /etc/vmware/installer.sh
+ + /home
+ - /home/*
+ + /lib
+ + /lib64
+ + /mnt
+ - /mnt/*
+ + /opt
+ - /opt/openslx
+ + /proc
+ - /proc/*
+ + /root
+ - /root/*
+ + /sbin
+ + /sys
+ - /sys/*
+ + /tmp
+ - /tmp/*
+ + /usr
+ - /usr/lib/vmware/modules/*
+ + /var
+ - /var/lib/vmware
+ - /var/opt/openslx
+ - /var/tmp/*
+ ";
+
$self->initDistroInfo();
}
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index a804632f..b39fe9a7 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -690,17 +690,7 @@ sub clone_fetchSource
my $source = shift;
vlog 0, _tr("Cloning vendor-OS from <%s>...\n", $source);
- my (@includeList, @excludeList);
- my $filterFile = "../lib/distro-info/clone-filter-common";
- if (open(FILTER, "< $filterFile")) {
- while(<FILTER>) {
- chomp;
- push @includeList, $_ if /^\+\s+/;
- push @excludeList, $_ if /^\-\s+/;
- }
- close(FILTER);
- }
- my $excludeIncludeList = join("\n", @includeList, @excludeList);
+ my $excludeIncludeList = $self->clone_determineIncludeExcludeList();
vlog 1, "using exclude-include-filter:\n$excludeIncludeList\n";
open(RSYNC, "| rsync -av --delete --exclude-from=- $source $self->{'vendor-os-path'}")
or die _tr("unable to start rsync for source '%s', giving up! (%s)",
@@ -712,6 +702,19 @@ sub clone_fetchSource
}
}
+sub clone_determineIncludeExcludeList
+{
+ my $self = shift;
+
+ my $localFilterFile = "../lib/distro-info/clone-filter.local";
+ my $includeExcludeList = slurpFile($localFilterFile, 1);
+ $includeExcludeList .= $self->{distro}->{'clone-filter'};
+ $includeExcludeList =~ s[^\s+][]igms;
+ # remove any leading whitespace, as rsync doesn't like it
+ return $includeExcludeList;
+}
+
+
################################################################################
### utility functions
################################################################################