diff options
author | Marc Weber <marco-oweber@gmx.de> | 2009-06-30 14:29:20 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2009-06-30 14:29:20 +0000 |
commit | d1e39e78f91ba55314dc0043081e42f17adbddd7 (patch) | |
tree | 1a6a5ea789eca63a12c9caf9a6274eacad9b64ab /pkgs/build-support/buildenv/builder.pl | |
parent | 8661c406f21cfa44efa411ce0905cd6857487579 (diff) | |
download | nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar.gz nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar.bz2 nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar.lz nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar.xz nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.tar.zst nixpkgs-d1e39e78f91ba55314dc0043081e42f17adbddd7.zip |
adding rubygems support to nix - implemented target libraries/apps: sup mail client
svn path=/nixpkgs/trunk/; revision=16100
Diffstat (limited to 'pkgs/build-support/buildenv/builder.pl')
-rwxr-xr-x | pkgs/build-support/buildenv/builder.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index 2da4311b388..35a75be053e 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -21,7 +21,9 @@ sub isInPathsToLink { my $path = shift; $path = "/" if $path eq ""; foreach my $elem (@pathsToLink) { + print "isInPathsToLink elem, path $elem , $path\n"; return 1 if substr($path, 0, length($elem)) eq $elem; + print "no\n"; } return 0; } @@ -47,12 +49,14 @@ sub createLinks { my $ignoreCollisions = shift; my @srcFiles = glob("$srcDir/*"); + print "in createLinks $relName, $srcDir, $dstDir, $ignoreCollisions, @srcFiles\n"; foreach my $srcFile (@srcFiles) { my $baseName = $srcFile; $baseName =~ s/^.*\///g; # strip directory my $dstFile = "$dstDir/$baseName"; my $relName2 = "$relName/$baseName"; + print "foreach source file $srcFile ...\n"; # Urgh, hacky... if ($srcFile =~ /\/propagated-build-inputs$/ || @@ -61,12 +65,15 @@ sub createLinks { $srcFile =~ /\/info\/dir$/ || $srcFile =~ /\/log$/) { + print "do nothing\n"; # Do nothing. } elsif (-d $srcFile) { + print "-d !\n"; if (!isInPathsToLink($relName2)) { + print "not isInPathsToLink, recurse\n"; # This path is not in the list of paths to link, but # some of its children may be. createLinks($relName2, $srcFile, $dstFile, $ignoreCollisions); @@ -76,11 +83,13 @@ sub createLinks { lstat $dstFile; if (-d _) { + print "-d _\n"; createLinks($relName2, $srcFile, $dstFile, $ignoreCollisions); } elsif (-l _) { my $target = readlink $dstFile or die; + print "-l $target\n"; if (!-d $target) { die "collission between directory `$srcFile' and non-directory `$target'"; } @@ -91,6 +100,7 @@ sub createLinks { } else { + print "symLinkMkdir \n"; symLinkMkdir $srcFile, $dstFile; } } @@ -103,7 +113,9 @@ sub createLinks { } else { + print "next unless relName2 $relName2 \n"; next unless isInPathsToLink($relName2); + print "passed \n"; symLinkMkdir $srcFile, $dstFile; } } @@ -117,6 +129,7 @@ sub addPkg; sub addPkg { my $pkgDir = shift; my $ignoreCollisions = shift; + print "adding $pkgDir\n"; return if (defined $done{$pkgDir}); $done{$pkgDir} = 1; |