From: Ian Jackson Date: Thu, 15 Dec 2016 00:06:19 +0000 (+0000) Subject: If we cannot hardlink origs into our extraction area, use symlinks instead. X-Git-Tag: archive/debian/2.12~10 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=801b029f697680642110406338ccae7a0179e6de;hp=761257ea4fc5cad5eac4a06e09d5ebabaab2296f If we cannot hardlink origs into our extraction area, use symlinks instead. Closes:#844570. Signed-off-by: Ian Jackson --- diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 1bac97bd..50e3b860 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -289,7 +289,9 @@ sub link_ltarget ($$) { if (-l _) { $old = cmdoutput qw(realpath --), $old; } - link $old, $new or die "link $old $new: $!"; + my $r = link $old, $new; + $r = symlink $old, $new if !$r && $!==EXDEV; + $r or die "(sym)link $old $new: $!"; } sub hashfile ($) { diff --git a/debian/changelog b/debian/changelog index d2127cdb..907e5e95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ dgit (2.12~) unstable; urgency=medium * Give better advice if .dsc/.changes signing fails: if no changes are needed to the package, user may indeed just debsign and dput. Closes:#844131. + * If we cannot hardlink origs into our extraction area, use symlinks + instead. Closes:#844570. Test suite: * Provide and use stunt lintian and debuild, to avoid lintian