Skip to content

Commit c615665

Browse files
plastikosmasahir0y
authored andcommitted
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: b44aa8c ("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>
1 parent 07d4cc2 commit c615665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.package

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-
103103
debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
104104
debian-orig: mkdebian-opts = --need-source
105105
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 \
107107
ln -f $< ../$(orig-name); \
108108
else \
109109
cp $< ../$(orig-name); \

0 commit comments

Comments
 (0)