Skip to contentSkip to conversation

nopackages: Add class for recipes which don't generate packages

PATCH New Richard Purdie 1 participant 1 message Dec 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nopackages: Add class for recipes which don't generate packages

It turns out writing the same list of packaging tasks multiple times in multiple places is error prone. Move this to a new class 'nopackages", migrate existing users and add glibc-initial and libgcc-initial since we don't want packages for those recipes.

This means the sstate for those recipes won't be installed, saving small amounts of build time and bandwidth.

A reference to the old package_write task is also dropped.

meta/classes/cross.bbclass +1 -7
index 3eab5b9..81d1c9d 100644
@@ -68,10 +68,4 @@ do_install () {
 
 USE_NLS = "no"
 
-deltask package
-deltask packagedata
-deltask package_qa
-deltask package_write_ipk
-deltask package_write_deb
-deltask package_write_rpm
-deltask package_write
+inherit nopackages
meta/classes/native.bbclass +1 -7
index bcbcd61..aac2c1e 100644
@@ -169,13 +169,7 @@ python native_virtclass_handler () {
 addhandler native_virtclass_handler
 native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
 
-deltask package
-deltask packagedata
-deltask package_qa
-deltask package_write_ipk
-deltask package_write_deb
-deltask package_write_rpm
-deltask package_write
+inherit nopackages
 
 do_packagedata[stamp-extra-info] = ""
 do_populate_sysroot[stamp-extra-info] = ""
meta/classes/nopackages.bbclass new file +6 -0
new file mode 100644
index 0000000..0c2761b
@@ -0,0 +1,6 @@
+deltask do_package
+deltask do_package_write_rpm
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_qa
+deltask do_packagedata
meta/recipes-core/glibc/glibc-initial.inc +2 -0
index 3500848..8e81f09 100644
@@ -74,3 +74,5 @@ do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
 do_evacuate_scripts () {
 	:
 }
+
+inherit nopackages
meta/recipes-devtools/gcc/gcc-cross-initial.inc +1 -0
index c0fa139..c2e5ddd 100644
@@ -95,3 +95,4 @@ sysroot_stage_all() {
 do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/"
 do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"
 
+inherit nopackages
meta/recipes-devtools/gcc/gcc-source.inc +2 -6
index 794fd4d..49bde92 100644
@@ -1,16 +1,12 @@
 deltask do_configure 
 deltask do_compile 
-deltask do_package 
-deltask do_package_write_rpm 
-deltask do_package_write_ipk 
-deltask do_package_write_deb
 deltask do_install 
 deltask do_populate_sysroot
 deltask do_populate_lic 
-deltask do_package_qa
-deltask do_packagedata
 deltask do_rm_work
 
+inherit nopackages
+
 PN = "gcc-source-${PV}"
 WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
 SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
meta/recipes-devtools/gcc/libgcc-initial.inc +1 -0
index 4e92f00..f295fe0 100644
@@ -16,3 +16,4 @@ LIBGCCBUILDTREENAME = "gcc-build-internal-initial-"
 
 do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
 
+inherit nopackages