Bug 2405

Summary: remove pkgs from a build
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: Low CC: mark.hatle, poky.bs.watcher, poky.watcher, richard.purdie, sgw, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.3   
Hardware: x86   
OS: Multiple   
Whiteboard: (P3)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-05-03 09:07:29 UTC
we support add pkgs to a build currently, for example, meta/recipes-sato/tasks/task-core-x11-sato.bb:

RDEPENDS_task-core-x11-sato = "\
    matchbox-desktop \
    matchbox-session-sato \
    matchbox-keyboard \
    matchbox-stroke \
    matchbox-config-gtk \
    ...

that would make the matchbox-* pkgs install to the core-image-sato image since it is used by core-image.bbclass, but it seems that we don't have a way to remove some pkgs from it, which would be useful in the following scene:

task-A will install pkg_a, pkg_b and pkg_c
taks-B will install some pkgs, but it doesn't need pkg_c.

If a image uses task-A and task-B at the same time, there would be conflicts, this would be fixed if pkg_c can be removed by task-B, something like:

RDEPENDS_task-B -= "pkgc pkgx..."
Comment 1 Saul Wold 2012-05-03 23:15:33 UTC
Dependencies are there for a reason, removing a dependency may break other packages.  I am not sure that this makes sense
Comment 2 Robert Yang 2012-05-04 02:04:04 UTC
(In reply to comment #1)
> Dependencies are there for a reason, removing a dependency may break other
> packages.  I am not sure that this makes sense

Yes, this is a potential error, but the task itself should take care of this, if RDEPENDS_task-A removes a dependency of task-B, then task-A and task-B should be conflict tasks, or there is something else wrong, and the dependency error can be raised by bitbake. This can make task assemble more flexiblely.