chiark / gitweb /
nailing-cargo: Do not adjust paths in the same subdir
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2020 17:04:25 +0000 (18:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2020 17:09:59 +0000 (18:09 +0100)
This usually means paths in the same workspace.

This does away with the need for
  8dbd084a86a3dff840a215211cf8304ee61a927a
  nailing-cargo: Work around cargo annoyance with workspaces

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
nailing-cargo

index 6ee9cdc5581f4b72012d016566e70bdeb8ba8c4e..a8058ed3fb363ed31c0b06a99019b37f763def18 100755 (executable)
@@ -446,17 +446,11 @@ sub calculate () {
       foreach my $p (keys %packagemap) {
        my $info = $deps->{$p};
        next unless defined $info;
+       next if $packagemap{$p}[1] eq $mf_org_subdir;
        $deps->{$p} = $info = { } unless ref $info;
        my $oldpath = $info->{path};
        delete $info->{version};
        my $newpath = $worksphere.'/'.$packagemap{$p}[0];
-       if ($cargo_lock_update and defined $oot_dir and
-           $newpath =~ m{^\Q$src_absdir\E(?=$|/)}) {
-         our $oot_subdir_realpath;
-         $oot_subdir_realpath //= Cwd::realpath "$oot_absdir/$subdir"
-           // die "$self: cannot resolve $oot_absdir/$subdir: $!";
-         $newpath = $oot_subdir_realpath.$';
-       }
        print STDERR "in $mf set $p path=$newpath (was ".
          ($oldpath // '<unset>').")\n"
          if $verbose >= 4;