mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
Ignore fake collisions
svn path=/nixpkgs/trunk/; revision=21075
This commit is contained in:
parent
cd56e341de
commit
295af6ab17
@ -1,7 +1,7 @@
|
||||
#! @perl@ -w
|
||||
|
||||
use strict;
|
||||
use Cwd;
|
||||
use Cwd 'abs_path';
|
||||
use IO::Handle;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
@ -96,9 +96,17 @@ sub createLinks {
|
||||
}
|
||||
|
||||
elsif (-l $dstFile) {
|
||||
if (!$ignoreCollisions) {
|
||||
my $target = readlink $dstFile;
|
||||
die "collission between `$srcFile' and `$target'";
|
||||
my $oldTarget = readlink $dstFile;
|
||||
my $oldTargetReal = abs_path $oldTarget;
|
||||
my $newTarget = $srcFile;
|
||||
my $newTargetReal = abs_path $newTarget;
|
||||
unless ($newTargetReal eq $oldTargetReal) {
|
||||
if ($ignoreCollisions) {
|
||||
warn "collision between `$newTarget' and `$oldTarget'\n";
|
||||
}
|
||||
else {
|
||||
die "collision between `$newTarget' and `$oldTarget'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +122,7 @@ my %done;
|
||||
my %postponed;
|
||||
|
||||
sub addPkg;
|
||||
sub addPkg {
|
||||
sub addPkg($;$) {
|
||||
my $pkgDir = shift;
|
||||
my $ignoreCollisions = shift;
|
||||
|
||||
@ -131,6 +139,7 @@ sub addPkg {
|
||||
close PROP;
|
||||
my @propagated = split ' ', $propagated;
|
||||
foreach my $p (@propagated) {
|
||||
print "$pkgDir propagates $p\n";
|
||||
$postponed{$p} = 1 unless defined $done{$p};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user