diff options
author | Oliver Tappe | 2007-05-12 19:19:47 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-05-12 19:19:47 +0200 |
commit | 764e85012ed65d8b3eb7fcfaba75a97e838f65e4 (patch) | |
tree | 802b0a0f34b1c4061b96c84afc4fa2d8776562f2 /installer | |
parent | Switched default behaviour to late_dm="yes" (to avoid keyboard troubles (diff) | |
download | core-764e85012ed65d8b3eb7fcfaba75a97e838f65e4.tar.gz core-764e85012ed65d8b3eb7fcfaba75a97e838f65e4.tar.xz core-764e85012ed65d8b3eb7fcfaba75a97e838f65e4.zip |
* fixed fatal error in case a distro-info does not specify excludes
* improved handling of clone sources to make sure they always end with a slash,
as otherwise "bad things happen"(tm)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1058 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index c5160234..d3b4f318 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -196,6 +196,12 @@ sub cloneVendorOS my $self = shift; my $source = shift; + if (substr($source, -1, 1) ne '/') { + # make sure source path ends with a slash, as otherwise, the + # last folder would be copied (but we only want its contents). + $source .= '/'; + } + $self->{'clone-source'} = $source; my $lastCloneSource; my $cloneInfoFile = "$self->{'vendor-os-path'}/.openslx-clone-info"; @@ -368,7 +374,10 @@ sub readDistroInfo # merge user-provided configuration distro defaults... my %repository = %{$self->{distro}->{config}->{repository}}; my %selection = %{$self->{distro}->{config}->{selection}}; - my %excludes = %{$self->{distro}->{config}->{excludes}}; + my %excludes = + defined $self->{distro}->{config}->{excludes} + ? %{$self->{distro}->{config}->{excludes}} + : (); my $package_subdir = $self->{distro}->{config}->{'package-subdir'}; my $prereq_packages = $self->{distro}->{config}->{'prereq-packages'}; my $bootstrap_prereq_packages @@ -896,7 +905,10 @@ sub clone_fetchSource $self->{'vendor-os-path'}); 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'}") + my $rsyncCmd + = "rsync -av --delete --exclude-from=- $source $self->{'vendor-os-path'}"; + vlog 2, "executing: $rsyncCmd\n"; + open(RSYNC, "| $rsyncCmd") or die _tr("unable to start rsync for source '%s', giving up! (%s)\n", $source, $!); print RSYNC $excludeIncludeList; |