Bug 4798 - bitbake -g can't detect certain nonexistent package
Summary: bitbake -g can't detect certain nonexistent package
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-02 06:51 UTC by Yi Zhao
Modified: 2013-10-02 09:39 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2013-07-02 06:51:38 UTC
git rev: master/f744edc0b8752b20c2a0335aa67312bc3b953507

Steps:
1. Download the poky source and set the environment.
2. Edit the conf/local.conf, add the following line:
CORE_IMAGE_EXTRA_INSTALL += "ncurses-lib12344"
3. Run "bitbake -g core-image-sato"

Because the package "ncurses-lib12344" doesn't exist. The bitbake -g should report this error. But now it can not found this error.
When run "bitbake ncurses-lib12344", it can report the error:
ERROR: Nothing PROVIDES 'ncurses-lib12344'
Comment 1 Paul Eggleton 2013-07-04 07:47:43 UTC
This is a bit tricky. Sometimes it is useful to be able to analyse the dependency chain to find out where something that is not provided is being pulled in. I'd expect bitbake -g to warn rather than error in this situation and include the nonexistent items in the graphs.
Comment 2 Robert Yang 2013-07-12 09:40:51 UTC
bitbake -g can find out the no rprovider packages, this case is because ncurses-lib12344 is in ncurses' PACKAGES_DYNAMIC:

PACKAGES_DYNAMIC = "^${PN}-lib.*"

The "^${PN}-lib.*" matches ncurses-lib12344, so there is no errors when "bitbake -g" or bitbake <image-recipe>".

I think that we'd better not warn such a case since there are many dynamic packages otherwise there would be too many warnings, for example, the perl and kernel modules, maybe we can print a debug info, here is the patch:

diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 3d0fb48..c9ca742 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -376,5 +376,6 @@ def getRuntimeProviders(dataCache, rdepend):
             regexp_cache[pattern] = regexp
         if regexp.match(rdepend):
             rproviders += dataCache.packages_dynamic[pattern]
+            logger.debug(1, "Assuming %s is a dynamic package, but it may not exist" % rdepend)
 
     return rproviders
Comment 4 Razvan Ionescu 2013-10-02 09:39:10 UTC
Verified with: e605ecfd95d2b1573cb51de01c2e0c72e10b8ae0
Works as Robert Yang described above.