Skip to content

Commit

Permalink
Item8758: Cleanup the reporting of pseudo-install so it will no longe…
Browse files Browse the repository at this point in the history
…r report errors for files which will be generated by alternate methods

git-svn-id: http://svn.foswiki.org/branches/Release01x01@9023 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Sep 12, 2010
1 parent 6e7cbfb commit f674c88
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions core/pseudo-install.pl
Expand Up @@ -154,8 +154,7 @@ sub installModule {
if ( $module eq 'core' ) {

# Special install procedure for core, processes manifest
# and checks for missing files, and generates derived objects
# along the way (such as compressed JS and CSS)
# and checks for missing files
$moduleDir = '.';
$ignoreBlock = 1;
}
Expand Down Expand Up @@ -426,15 +425,15 @@ sub generateAlternateVersion {
# See also: just_link
sub copy_in {
my ( $moduleDir, $dir, $file, $ignoreBlock ) = @_;
return
if ( -e "$file" && $ignoreBlock )
; # For core manifest, ignore copy if target exists.

# For core manifest, ignore copy if target exists.
return if -e $file and $ignoreBlock;
File::Path::mkpath( _cleanPath($dir) );
if ( -e "$moduleDir/$file" ) {
File::Copy::copy( "$moduleDir/$file", $file )
|| die "Couldn't install $file: $!";
or die "Couldn't install $file: $!";
print "Copied $file\n";
}
print "Copied $file\n";
}

sub _cleanPath {
Expand Down Expand Up @@ -487,8 +486,6 @@ sub just_link {
foreach my $c (@components) {
if ( -l $path . $c ) {
_checkLink( $moduleDir, $path, $c ) unless $ignoreBlock;

#warn "$path$c already linked\n";
last;
}
elsif ( -d "$path$c" ) {
Expand All @@ -513,11 +510,8 @@ sub just_link {
if ( -e $tgt ) {
die "Failed to link $path$c to $tgt: $!"
unless symlink( $tgt, _cleanPath( $path . $c ) );
print "Linked $path$c\n";
}
else {
warn "WARNING: no such file $tgt\n";
}
print "Linked $path$c\n";
last;
}
}
Expand Down

0 comments on commit f674c88

Please sign in to comment.