Bug 5533 - bitbake -g can't figure out non-existed packages
Summary: bitbake -g can't figure out non-existed packages
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-11-14 09:12 UTC by Robert Yang
Modified: 2017-07-03 15:15 UTC (History)
7 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 Robert Yang 2013-11-14 09:12:40 UTC
It seems that bitbake assumes recipe RPROVIDES PN by default, but this would cause problems:

Steps to reproduce:

$ echo IMAGE_INSTALL_append += \"dhcp\" >> conf/local.conf

$ bitbake dhcp

$ bitbake -g core-image-minimal (works well)

$ bitbake core-image-minimal

There would be the error:

| Error: dhcp not found in the base feeds (qemuarm armv5te armv5e armv5t armv5 armv4t armv4 arm noarch any all).
| WARNING: /buildarea/lyang1/doratest6/tmp/work/qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_rootfs.20784:1 exit 1 from
|   exit 1

NOTE:
The dhcp is in its PACKAGES, but it doesn't matter, we will still get the error if is not in its PACKAGES.
Comment 1 Ross Burton 2017-06-20 11:09:35 UTC
The problem is that the dhcp recipe has dhcp in PACKAGES, but it is empty so doesn't actually get generated.

Bitbake can't know this, so it is doing the right thing.

(a proper fix would be to stop the dhcp recipe from claiming it produces a dhcp package)
Comment 2 Ross Burton 2017-06-20 11:18:56 UTC
Hm, no, sorry didn't read the report correctly.

If you do PACKAGES_remove=$PN then bitbake still tries to build an image.
Comment 3 Ross Burton 2017-06-20 11:35:00 UTC
cache.py, CoreRecipeInfo constructor:

  if not self.pn in self.packages:
    self.packages.append(self.pn)

if PN isn't in the PACKAGES list, add PN.

Simply commenting out that line breaks the cache as native packages don't have PACKAGES.  Maybe native should just set PACKAGES=PN?
Comment 4 Ross Burton 2017-06-27 11:13:31 UTC
Patch on the list
Comment 5 Ross Burton 2017-07-03 15:15:41 UTC
Fixed in bitbake df31a88786ce5bd7708ff14e1379dc2a58a8c0cf.