Skip to content

Commit

Permalink
kbuild: deb-pkg: add --source-option=-sP
Browse files Browse the repository at this point in the history
If the source package fails to build, ../linux.orig is left over.
In the next run of 'make deb-pkg', you will get the following error:

  dpkg-source: error: orig directory 'linux.orig' already exists, not overwriting, giving up; use -sA, -sK or -sP to override

You can manually remove ../linux.orig, but it is annoying.

Pass -sP down to dpkg-source.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
masahir0y committed Feb 5, 2023
1 parent 1cb86b6 commit 58e0e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.package
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ deb-pkg:
$(call cmd,src_tar,$(KDEB_SOURCENAME))
origversion=$$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$$//');\
mv $(KDEB_SOURCENAME).tar.gz ../$(KDEB_SOURCENAME)_$${origversion}.orig.tar.gz
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -i.git -us -uc
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) --source-option=-sP -i.git -us -uc

PHONY += bindeb-pkg
bindeb-pkg:
Expand Down

0 comments on commit 58e0e5c

Please sign in to comment.