[REVIEW 06/10][linux] UBUNTU: [Packaging] Generate linux-doc for only the primary variant

Seth Forshee seth.forshee at canonical.com
Tue Dec 3 22:26:40 UTC 2019


Even though the doc package is generated as SRCPKGNAME-doc in the
control stub, we're really only set up to have a single doc
package. Therefore split out linux-doc into its own control stub,
which will be included in the control file for only the primary
variant.

Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
---
 debian.master/control.stub.in   | 13 -------------
 debian/control.d/linux-doc.stub | 12 ++++++++++++
 debian/rules                    |  3 +++
 debian/rules.d/0-common-vars.mk |  4 ++++
 4 files changed, 19 insertions(+), 13 deletions(-)
 create mode 100644 debian/control.d/linux-doc.stub

diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
index 088bc785e280..255577966204 100644
--- a/debian.master/control.stub.in
+++ b/debian.master/control.stub.in
@@ -78,19 +78,6 @@ Description: Linux kernel source for version PKGVER with Ubuntu patches
  you do not want this package. Install the appropriate linux-headers
  package instead.
 
-Package: SRCPKGNAME-doc
-Build-Profiles: <!stage1>
-Architecture: all
-Section: doc
-Priority: optional
-Depends: ${misc:Depends}
-Description: Linux kernel specific documentation for version PKGVER
- This package provides the various documents in the PKGVER kernel
- Documentation/ subdirectory.  These document kernel subsystems, APIs, device
- drivers, and so on.  See
- /usr/share/doc/SRCPKGNAME-doc/00-INDEX for a list of what is
- contained in each file.
-
 Package: SRCPKGNAME-headers-PKGVER-ABINUM
 Build-Profiles: <!stage1>
 Architecture: all
diff --git a/debian/control.d/linux-doc.stub b/debian/control.d/linux-doc.stub
new file mode 100644
index 000000000000..a0e04473286d
--- /dev/null
+++ b/debian/control.d/linux-doc.stub
@@ -0,0 +1,12 @@
+Package: linux-doc
+Build-Profiles: <!stage1>
+Architecture: all
+Section: doc
+Priority: optional
+Depends: ${misc:Depends}
+Description: Linux kernel specific documentation for version PKGVER
+ This package provides the various documents in the PKGVER kernel
+ Documentation/ subdirectory.  These document kernel subsystems, APIs, device
+ drivers, and so on.  See
+ /usr/share/doc/SRCPKGNAME-doc/00-INDEX for a list of what is
+ contained in each file.
diff --git a/debian/rules b/debian/rules
index 47cbe03de04f..d35898ce2747 100755
--- a/debian/rules
+++ b/debian/rules
@@ -179,6 +179,9 @@ control_files := $(DEBIAN)/control.stub.in
 ifeq ($(do_libc_dev_package),true)
 	control_files += $(DROOT)/control.d/linux-libc-dev.stub
 endif
+ifeq ($(do_doc_package),true)
+	control_files += $(DROOT)/control.d/linux-doc.stub
+endif
 
 # Misc stuff
 .PHONY: $(DEBIAN)/control.stub
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 37574fbbdfde..8d02b2d9c6bc 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -152,7 +152,11 @@ indep_hdrs_pkg_name=$(src_pkg_name)-headers-$(abi_release)
 # cycle, so its OK to leave 'do_doc_package_content=false' until those build
 # failures get sorted out. Finally, the doc package doesn't really need to be built
 # for developer testing (its kind of slow), so only do it if on a buildd.
+ifneq ($(filter --,$(variants)),)
 do_doc_package=true
+else
+do_doc_package=false
+endif
 do_doc_package_content=true
 ifeq ($(full_build),false)
 do_doc_package_content=false
-- 
2.24.0




More information about the kernel-team mailing list