diff mbox series

[v2,1/1] kbuild: deb-pkg: default dpkg-buildpackage --build

Message ID 20230307112028.14190-2-bage@linutronix.de (mailing list archive)
State New, archived
Headers show
Series kbuild: deb-pkg: default dpkg-buildpackage --build | expand

Commit Message

Bastian Germann March 7, 2023, 11:20 a.m. UTC
deb-pkg's dpkg-buildpackage invocation was added --build=source,binary
recently. Before, it relied on the default, which is the same, so it
no difference for the built packages.

However, the explicit --build eliminates overriding it via DPKG_FLAGS,
which used to fill the gap of generating only a source package without
building it.

Recover the old, default behavior.

Fixes: 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
 scripts/Makefile.package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masahiro Yamada March 10, 2023, 2:37 p.m. UTC | #1
On Tue, Mar 7, 2023 at 8:20 PM Bastian Germann <bage@linutronix.de> wrote:
>
> deb-pkg's dpkg-buildpackage invocation was added --build=source,binary
> recently. Before, it relied on the default, which is the same, so it
> no difference for the built packages.
>
> However, the explicit --build eliminates overriding it via DPKG_FLAGS,
> which used to fill the gap of generating only a source package without
> building it.
>
> Recover the old, default behavior.
>
> Fixes: 7bf4582d7aad ("kbuild: deb-pkg: create source package without cleaning")
> Signed-off-by: Bastian Germann <bage@linutronix.de>
> ---
>  scripts/Makefile.package | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index b941e6341b36..fe1721915a59 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -120,7 +120,7 @@ debian-orig: linux.tar.gz debian
>  PHONY += deb-pkg
>  deb-pkg: debian-orig
>         +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
> -               --build=source,binary -nc -us -uc
> +               -nc -us -uc
>
>  PHONY += bindeb-pkg
>  bindeb-pkg: debian
> --
> 2.39.2
>



I applied this, then dropped it.

This patch is wrong.


If this patch is applied, 'make deb-pkg'
would not produce the source package at all.


Now I recalled the reason why I added this.



dpkg-buildpackage(1):

 full
     Builds everything.  This is an alias for source,any,all, and the
     same as the default case when no build option is specified.
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


NACK





--
Best Regards
Masahiro Yamada
Bastian Germann March 10, 2023, 2:49 p.m. UTC | #2
Am 10.03.23 um 15:37 schrieb Masahiro Yamada:
> If this patch is applied, 'make deb-pkg'
> would not produce the source package at all.

How so? Are you saying `make deb-pkg` never built a source package with <= 6.2?
Because those never specified a --build.

> Now I recalled the reason why I added this.
> 
> 
> 
> dpkg-buildpackage(1):
> 
>   full
>       Builds everything.  This is an alias for source,any,all, and the
>       same as the default case when no build option is specified.
>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

full is the default for --build. I guess the wording here is so tedious
because you can have -S, -b, -B and so on which all imply some --build.

> NACK
Bastian Germann March 10, 2023, 3:25 p.m. UTC | #3
Am 10.03.23 um 15:49 schrieb Bastian Germann:
> Am 10.03.23 um 15:37 schrieb Masahiro Yamada:
>> If this patch is applied, 'make deb-pkg'
>> would not produce the source package at all.
> 
> How so? Are you saying `make deb-pkg` never built a source package with <= 6.2?
> Because those never specified a --build.
> 
>> Now I recalled the reason why I added this.
>>
>>
>>
>> dpkg-buildpackage(1):
>>
>>   full
>>       Builds everything.  This is an alias for source,any,all, and the
>>       same as the default case when no build option is specified.
>>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> full is the default for --build. I guess the wording here is so tedious
> because you can have -S, -b, -B and so on which all imply some --build.
> 
>> NACK

I see. The option -nc implies -b. So yes, you are right.
diff mbox series

Patch

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index b941e6341b36..fe1721915a59 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -120,7 +120,7 @@  debian-orig: linux.tar.gz debian
 PHONY += deb-pkg
 deb-pkg: debian-orig
 	+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
-		--build=source,binary -nc -us -uc
+		-nc -us -uc
 
 PHONY += bindeb-pkg
 bindeb-pkg: debian