From: Ian Jackson Date: Wed, 10 Oct 2018 23:28:55 +0000 (+0100) Subject: dgit: Handle EXDEV when putting in place output source X-Git-Tag: archive/debian/8.0~46 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=327b277d06a194a614b6cc3f872c8a678292d7bc;p=dgit.git dgit: Handle EXDEV when putting in place output source Replace a rename call with rename_link_xf, and change the subsequent error handling to use $@ iff appropriate. Closes: #910730. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index e35f1681..5b223afb 100755 --- a/dgit +++ b/dgit @@ -6603,8 +6603,8 @@ sub build_source { my $mv = sub { my ($why, $l) = @_; printdebug " renaming ($why) $l\n"; - rename "$l", bpd_abs()."/$l" - or fail f_ "put in place new built file (%s): %s", $l, $!; + rename_link_xf 0, "$l", bpd_abs()."/$l" + or fail f_ "put in place new built file (%s): %s", $l, $@; }; foreach my $l (split /\n/, getfield $dsc, 'Files') { $l =~ m/\S+$/ or next;