Projects
OpenHPC3:3.0:Factory
warewulf-provision
_service:extract_file:warewulf-provision.bin-fi...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:warewulf-provision.bin-file.patch of Package warewulf-provision
--- a/cgi-bin/file.pl 2018-07-11 11:16:30.000000000 -0700 +++ b/cgi-bin/file.pl 2018-07-11 11:16:54.000000000 -0700 @@ -133,39 +133,41 @@ close CACHE; } - # Search for all matching variable entries. - foreach my $wwstring ($read_buffer =~ m/\%\{[^\}]+\}(?:\[\d+\])?/g) { - # Check for format, and seperate into a seperate wwvar string - if ($wwstring =~ /^\%\{(.+?)\}(\[(\d+)\])?$/) { - my $wwvar = $1; - my $wwarrayindex = $3; - # Set the current object that we are looking at. This is - # important as we iterate through multiple levels. - my $curObj = $node; - my @keys = split(/::/, $wwvar); - while(my $key = shift(@keys)) { - my $val = $curObj->get($key); - if (ref($val) eq "Warewulf::ObjectSet") { - my $find = shift(@keys); - my $o = $val->find("name", $find); - if ($o) { - $curObj = $o; + if ( $fileObj->format ne "binary" ) { + # Search for all matching variable entries. + foreach my $wwstring ($read_buffer =~ m/\%\{[^\}]+\}(?:\[\d+\])?/g) { + # Check for format, and seperate into a seperate wwvar string + if ($wwstring =~ /^\%\{(.+?)\}(\[(\d+)\])?$/) { + my $wwvar = $1; + my $wwarrayindex = $3; + # Set the current object that we are looking at. This is + # important as we iterate through multiple levels. + my $curObj = $node; + my @keys = split(/::/, $wwvar); + while(my $key = shift(@keys)) { + my $val = $curObj->get($key); + if (ref($val) eq "Warewulf::ObjectSet") { + my $find = shift(@keys); + my $o = $val->find("name", $find); + if ($o) { + $curObj = $o; + } else { + &dprint("Could not find object: $find\n"); + } + + } elsif (ref($val) eq "ARRAY") { + my $v; + if ($wwarrayindex) { + $v = $val->[$wwarrayindex]; + } else { + $v = $val->[0]; + } + $read_buffer =~ s/\Q$wwstring\E/$v/g; + } elsif ($val) { + $read_buffer =~ s/\Q$wwstring\E/$val/g; } else { - &dprint("Could not find object: $find\n"); + $read_buffer =~ s/\Q$wwstring\E//g; } - - } elsif (ref($val) eq "ARRAY") { - my $v; - if ($wwarrayindex) { - $v = $val->[$wwarrayindex]; - } else { - $v = $val->[0]; - } - $read_buffer =~ s/\Q$wwstring\E/$v/g; - } elsif ($val) { - $read_buffer =~ s/\Q$wwstring\E/$val/g; - } else { - $read_buffer =~ s/\Q$wwstring\E//g; } } }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.