From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: openembedded-devel@lists.openembedded.org
Subject: Re: defining FEATURE_PACKAGES_* in core-image.bbclass vs image.bbclass
Date: Tue, 15 Jul 2014 07:02:07 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.11.1407150648350.4969@localhost> (raw)
In-Reply-To: <CA+gsK-p7rV+HmdcskYkU0MYRn1zesYDgOUb4raVcj6_xW9x_ag@mail.gmail.com>
On Mon, 14 Jul 2014, Rudolf Streif wrote:
> >
> >
> > then i noticed that the "splash" feature is defined, not in
> > core-image.bbclass, but in the more basic image.bbclass, as is
> > package-management:
> >
> > FEATURE_PACKAGES_package-management = "${ROOTFS_PKGMANAGE}"
> > SPLASH ?= "psplash"
> > FEATURE_PACKAGES_splash = "${SPLASH}"
> >
> > And then there is debug-tweaks for which the hooks are defined in
> image.bbclass including the function zap_empty_root_password but the
> post-processing is added to the variable by core-image.bbclass:
>
> core-image.bbclass: ROOTFS_POSTPROCESS_COMMAND +=
> '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "",
> "zap_empty_root_password ; ",d)}'
>
> Since image.bbclass also adds the debug-tweaks to the valid image feature
> list
>
> image.bbclass:IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs"
... snip ...
there's something i'll throw in here now that i'm thinking about it.
i've wondered about that very line above -- what is its purpose?
as i read it, the primary purpose for the variable IMAGE_FEATURES is
to define packagegroups through the use of FEATURE_PACKAGES_* that you
see in core-image.bbclass. (so this is again a bit of weirdness where
code in image.bbclass refers up the "inheritance tree" to stuff found
in core-image.bbclass.)
however, there are of course some IMAGE_FEATURES that don't
correspond directly to package groups; eg, package-management,
debug-tweaks, read-only-rootfs. so why is "package-management" not
listed in the line:
image.bbclass:IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs"
is that variable flag supposed to list all valid, non-packagegroup
IMAGE_FEATURES?
i can see that debug-tweaks is processed explicitly in
image.bbclass:
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
but, then again, so is package-management:
ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
so why is debug-tweaks assigned to IMAGE_FEATURES[validitems] but
not package-management? oh, wait, i just noticed that image.bbclass
explicitly does this:
FEATURE_PACKAGES_package-management = "${ROOTFS_PKGMANAGE}"
so that package-management *will* be recognized as a valid image
feature here in image.bbclass:
def check_image_features(d):
valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split()
valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys()
for var in d:
if var.startswith("PACKAGE_GROUP_"):
bb.warn("PACKAGE_GROUP is deprecated, please use FEATURE_PACKAGES instead")
valid_features.append(var[14:])
elif var.startswith("FEATURE_PACKAGES_"):
valid_features.append(var[17:])
valid_features.sort()
gaaaaaaaaah! i need more coffee ...
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
prev parent reply other threads:[~2014-07-15 11:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 19:05 defining FEATURE_PACKAGES_* in core-image.bbclass vs image.bbclass Robert P. J. Day
2014-07-14 22:43 ` Rudolf Streif
2014-07-14 23:22 ` Robert P. J. Day
2014-07-15 0:36 ` Rudolf Streif
2014-07-15 0:39 ` Robert P. J. Day
2014-07-15 11:02 ` Robert P. J. Day [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.11.1407150648350.4969@localhost \
--to=rpjday@crashcourse.ca \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.