Skip to contentSkip to conversation

a bit of pedantry about core images

DISCUSSION Robert P. J. Day 2 participants 4 messages Jul 11, 2014

lore
Share & tools
lore
#0 lore raw

documenting some stuff about core images and a few quick questions.
first, in core-image.bbclass:

# By default we install packagegroup-core-boot and packagegroup-base packages - this gives us

# working (console only) rootfs.

actually, not quite true:

CORE_IMAGE_BASE_INSTALL = '\
packagegroup-core-boot \
packagegroup-base-extended \ <------

so that comment just needs to be fixed, i can take care of that.

next, i've always cringed at this bit of code:

  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    \
    ${CORE_IMAGE_EXTRA_INSTALL} \
    '

CORE_IMAGE_EXTRA_INSTALL ?= ""

  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"

could that not just be written as:

CORE_IMAGE_EXTRA_INSTALL ?= ""

  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    '

  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}" ${CORE_IMAGE_EXTRA_INSTALL}

which strikes me as much clearer. are those two snippets of code equivalent?

i think that's it.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw

Hi Robert,

Quoted 9 lines

documenting some stuff about core images and a few quick questions.
first, in core-image.bbclass:

# By default we install packagegroup-core-boot and packagegroup-base packages - this gives us

# working (console only) rootfs.

actually, not quite true:

Quoted 7 lines

CORE_IMAGE_BASE_INSTALL = '\
packagegroup-core-boot \
packagegroup-base-extended \ <------

so that comment just needs to be fixed, i can take care of that.

Kind of. You can look at it either way. packagegroup-base.bb defines a

whole bunch of package groups that depend on each other. packagegroup-base-extended depends on all of them hence adding it to an image will add all of them.

Quoted 17 lines

next, i've always cringed at this bit of code:

  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    \
    ${CORE_IMAGE_EXTRA_INSTALL} \
    '

CORE_IMAGE_EXTRA_INSTALL ?= ""

  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"

could that not just be written as:

CORE_IMAGE_EXTRA_INSTALL ?= ""

Quoted 8 lines
  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    '

  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}" ${CORE_IMAGE_EXTRA_INSTALL}

Yes, I agree, that is much cleaner but you have to place the quotes

correctly.

Cheers,
:rjs

#2 lore raw
Quoted 16 lines · Rudolf Streif

Hi Robert,

Quoted 13 lines

documenting some stuff about core images and a few quick questions.
first, in core-image.bbclass:

# By default we install packagegroup-core-boot and packagegroup-base packages - this gives us

# working (console only) rootfs.

actualliy, not quite true:

CORE_IMAGE_BASE_INSTALL = '\
packagegroup-core-boot \
packagegroup-base-extended \ <------

Quoted 7 lines
Quoted 2 lines

so that comment just needs to be fixed, i can take care of that.

Kind of. You can look at it either way. packagegroup-base.bb defines a whole bunch of package groups that depend on each other. packagegroup-base-extended depends on all of them hence adding it to an image will add all of them.

um ... ok, i'll check that, thanks.

Quoted 22 lines
Quoted 22 lines

next, i've always cringed at this bit of code:

  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    \
    ${CORE_IMAGE_EXTRA_INSTALL} \
    '

CORE_IMAGE_EXTRA_INSTALL ?= ""

  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"

could that not just be written as:

CORE_IMAGE_EXTRA_INSTALL ?= ""

  CORE_IMAGE_BASE_INSTALL = '\
    packagegroup-core-boot \
    packagegroup-base-extended \
    '
Quoted 4 lines
Quoted 3 lines
  IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}" ${CORE_IMAGE_EXTRA_INSTALL}

Yes, I agree, that is much cleaner but you have to place the quotes

correctly.

i realized what i had done the instant i hit "SEND". so ...

IMAGE_INSTALL ?= "\
      ${CORE_IMAGE_BASE_INSTALL} \
      ${CORE_IMAGE_EXTRA_INSTALL} \
      "

does that look right? any objections?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
Quoted 9 lines

i realized what i had done the instant i hit "SEND". so ...

IMAGE_INSTALL ?= "\
      ${CORE_IMAGE_BASE_INSTALL} \
      ${CORE_IMAGE_EXTRA_INSTALL} \
      "
Quoted 5 lines

does that look right? any objections?

Looks good to me.

IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}" ${CORE_IMAGE_EXTRA_INSTALL}

Need to fix that one too:

IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL} ${CORE_IMAGE_EXTRA_INSTALL}"

Do it and test it. Submit a patch. I am not the maintainer though.

Cheers,
:rjs