From: Ian Jackson Date: Sat, 25 Jul 2020 17:04:25 +0000 (+0100) Subject: nailing-cargo: Do not adjust paths in the same subdir X-Git-Tag: nailing-cargo/1.0.0~73 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=610db9eda10f5745401fba1aee4c34036bc73692;p=nailing-cargo.git nailing-cargo: Do not adjust paths in the same subdir 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 --- diff --git a/nailing-cargo b/nailing-cargo index 6ee9cdc..a8058ed 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -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 // '').")\n" if $verbose >= 4;