Patchwork [RFC] packagegroup.bbclass: Drop build-time dependencies

login
register
mail settings
Submitter Martin Jansa
Date Nov. 1, 2013, 12:12 p.m.
Message ID <1383307932-4041-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/60963/
State New
Headers show

Comments

Martin Jansa - Nov. 1, 2013, 12:12 p.m.
* RFC because:
  packagegroup.bbclass inherits allarch and by default sets
  PACKAGE_ARCH = "all", but then it has runtime-dependency on
  TUNE_PKGARCH packages and different signatures, so instead
  of setting INHIBIT_DEFAULT_DEPS in addition to inherit allarch
  I would like to drop default allarch completely.
* drop virtual/kernel dependency from packagegroup-core-boot
  because kernel isn't needed to build packagegroup and building
  it doesn't influence if it's included in image or not.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/packagegroup.bbclass                         | 4 ++++
 meta/recipes-core/packagegroups/packagegroup-core-boot.bb | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
Paul Eggleton - Nov. 1, 2013, 1:37 p.m.
Hi Martin,

On Friday 01 November 2013 13:12:12 Martin Jansa wrote:
> * RFC because:
>   packagegroup.bbclass inherits allarch and by default sets
>   PACKAGE_ARCH = "all", but then it has runtime-dependency on
>   TUNE_PKGARCH packages and different signatures, so instead
>   of setting INHIBIT_DEFAULT_DEPS in addition to inherit allarch
>   I would like to drop default allarch completely.

The fix looks OK, but I don't think we should be going further and removing the 
inherit. To my mind, the question of dependencies comes down to whether or not 
the packagegroup output changes depending on TUNE_PKGARCH, which in the 
general case it should not do.

If we need to do some optimisation to avoid the packagegroup recipe rebuilding 
when it shouldn't due to packages it "contains" changing, we can certainly 
look at that.

> * drop virtual/kernel dependency from packagegroup-core-boot
>   because kernel isn't needed to build packagegroup and building
>   it doesn't influence if it's included in image or not.

Yes, I agree this seems erroneous.

Cheers,
Paul

Patch

diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 9bc9cc2..bd212fd 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -11,6 +11,10 @@  PACKAGES = "${PN}"
 # need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass
 inherit allarch
 
+# allarch.bbclass does that only when PACKAGE_ARCH = "all", 
+# but we don't want any build time dependencies even for MACHINE_ARCH packagegroups
+INHIBIT_DEFAULT_DEPS = "1"
+
 # This automatically adds -dbg and -dev flavours of all PACKAGES
 # to the list. Their dependencies (RRECOMMENDS) are handled as usual
 # by package_depchains in a following step.
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 486385a..5455899 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -5,7 +5,6 @@ 
 SUMMARY = "Minimal boot requirements"
 DESCRIPTION = "The minimal set of packages required to boot the system"
 LICENSE = "MIT"
-DEPENDS = "virtual/kernel"
 PR = "r11"
 
 inherit packagegroup