Patchwork [20/22] package.bbclass: Better document the different phases of operation

login
register
mail settings
Submitter Richard Purdie
Date Feb. 3, 2013, 11:55 p.m.
Message ID <a8127137bd0ce5506e82641af52cc71a7f798113.1359935562.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/43899/
State Accepted
Commit b6438c94035a014902ec89af63ff3787cd8c67f6
Headers show

Comments

Richard Purdie - Feb. 3, 2013, 11:55 p.m.
Add headers to document the different phases of do_package and
make the steps clearer.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a09eb15..2c3f173 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1778,6 +1778,10 @@  python do_package () {
     # as any change to rpmdeps requires this to be rerun.
     # PACKAGE_BBCLASS_VERSION = "1"
 
+    ###########################################################################
+    # Sanity test the setup
+    ###########################################################################
+
     packages = (d.getVar('PACKAGES', True) or "").split()
     if len(packages) < 1:
         bb.debug(1, "No packages to build, skipping do_package")
@@ -1793,12 +1797,24 @@  python do_package () {
         bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
         return
 
+    ###########################################################################
+    # Setup PKGD (from D)
+    ###########################################################################
+
     for f in (d.getVar('PACKAGEBUILDPKGD', True) or '').split():
         bb.build.exec_func(f, d)
 
+    ###########################################################################
+    # Split up PKGD into PKGDEST
+    ###########################################################################
+
     for f in (d.getVar('PACKAGESPLITFUNCS', True) or '').split():
         bb.build.exec_func(f, d)
 
+    ###########################################################################
+    # Process PKGDEST
+    ###########################################################################
+
     # Build global list of files in each split package
     global pkgfiles
     pkgfiles = {}