Patchwork package.bbclass: Skip testing "packages" a second time.

login
register
mail settings
Submitter Robert P. J. Day
Date Jan. 3, 2013, 4:01 p.m.
Message ID <alpine.DEB.2.02.1301031058470.11708@oneiric>
Download mbox | patch
Permalink /patch/41905/
State New
Headers show

Comments

Robert P. J. Day - Jan. 3, 2013, 4:01 p.m.
Since the "packages" variable is already tested a few lines above in
the same routine:

    if len(packages) < 1:
        bb.debug(1, "No packages to build, skipping do_package")
        return

there is no point testing it again, and the error message doesn't even
refer to "packages", anyway.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 1ac6551..e609260 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1885,7 +1885,7 @@  python do_package () {
     dvar = d.getVar('PKGD', True)
     pn = d.getVar('PN', True)

-    if not workdir or not outdir or not dest or not dvar or not pn or not packages:
+    if not workdir or not outdir or not dest or not dvar or not pn:
         bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
         return