Re: Patch: Suppress irrelevant warning when generating a debian package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Sonntag, 29. März 2020, 14:01 schrieb Masahiro Yamada:
> 
> > By making a contribution to this project, I certify that:
> > The contribution was created in whole or in part by me and I have the
> > right to submit it under the open source license indicated in the file.
> 
> Please drop this.
> 
> Signed-off-by implies this.
> No need to explain this in an individual patch.

Droped in attached new version.

> > +if [ -n "$BUILD_DEBUG" ] ; then
> 
> This file does not define BUILD_DEBUG.
> So, this conditional is always false, isn't it?
> 
> It should be:
> 
> if is_enabled CONFIG_DEBUG_INFO; then
> 

The definition of BUILD_DEBUG is copied from builddeb too. 
See attached patch.

--
Best regards
Reinhard Karcher
from Reinhard.Karcher reinhard.karcher@xxxxxxx

Creating a Debian package by compiling the kernel
make bindeb-pkg
without creating debug information creates a warning that no
debug package was created
This patch excludes the debug package from the control file,
if no debug package is created by this configuration

Signed-off-by:Reinhard Karcher <reinhard.karcher@xxxxxxx>

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 357dc56bcf30..572abe5a149e 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -96,6 +96,7 @@ fi
 sourcename=$KDEB_SOURCENAME
 packagename=linux-image-$version
 kernel_headers_packagename=linux-headers-$version
+BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
 dbg_packagename=$packagename-dbg
 debarch=
 set_debarch
@@ -198,7 +199,10 @@ Description: Linux support headers for userspace development
  This package provides userspaces headers from the Linux kernel.  These headers
  are used by the installed headers for GNU glibc and other system libraries.
 Multi-Arch: same
+EOF

+if [ -n "$BUILD_DEBUG" ] ; then
+cat <<EOF >> debian/control
 Package: $dbg_packagename
 Section: debug
 Architecture: $debarch
@@ -206,6 +210,7 @@ Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
  all the necessary debug symbols for the kernel and its modules.
 EOF
+fi

 cat <<EOF > debian/rules
 #!$(command -v $MAKE) -f

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux