Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: Fix build target deb-pkg: ln: failed to create hard link

The make deb-pkg target calls debian-orig which attempts to either
hard link the source .tar to the build-output location or copy the
source .tar to the build-output location. The test to determine
whether to ln or cp is incorrectly expanded by Make and consequently
always attempts to ln the source .tar. This fix corrects the escaping
of '$' so that the test is expanded by the shell rather than by Make
and appropriately selects between ln and cp.

Fixes: b44aa8c96e9e ("kbuild: deb-pkg: make .orig tarball a hard link if possible")
Signed-off-by: Thayne Harbaugh <thayne@mastodonlabs.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Thayne Harbaugh and committed by
Masahiro Yamada
c6156653 07d4cc2e

+1 -1
+1 -1
scripts/Makefile.package
··· 103 103 debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix) 104 104 debian-orig: mkdebian-opts = --need-source 105 105 debian-orig: linux.tar$(debian-orig-suffix) debian 106 - $(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \ 106 + $(Q)if [ "$$(df --output=target .. 2>/dev/null)" = "$$(df --output=target $< 2>/dev/null)" ]; then \ 107 107 ln -f $< ../$(orig-name); \ 108 108 else \ 109 109 cp $< ../$(orig-name); \