Skip to contentSkip to conversation

How can a package I didn't ask for get included in my image?

DISCUSSION Gary Thomas 4 participants 6 messages Mar 6, 2012

lore
Share & tools
lore
#0 lore raw

Note: I'm not sure the best list to use for this, but I'll start here. I build using poky plus my own distro.conf and my own image recipes, etc. My example below uses stylized package and target names.

I'm trying to figure out why a particular package is ending up
in my final image. If I build something like this:
% bitbake my-image
If I then look, I find packages that were installed that I'm
never mentioning:
% grep firmware tmp/work/my-board/my-image/temp/log.do_rootfs
Installing linux-firmware-wl12xx (0.0+git1+09c949f6d3196a7199eb2c7015bfa5d34ed723b5-r0) to root...
so I tried to figure out how this is getting in
% bitbake my-image -g
% grep firmware *.dot
... comes up empty

To be fair, I had originally built this image with this in <my-board>.conf
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules linux-firmware-wl12xx "
but that has since been removed. Somehow, it's ghost lingers on...

How can this be?
How can I get rid of it, short of a complete rebuild?

Thanks for any insight into this mystery.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 17 lines · Gary Thomas

Note: I'm not sure the best list to use for this, but I'll start here. I build using poky plus my own distro.conf and my own image recipes, etc. My example below uses stylized package and target names.

I'm trying to figure out why a particular package is ending up
in my final image. If I build something like this:
% bitbake my-image
If I then look, I find packages that were installed that I'm
never mentioning:
% grep firmware tmp/work/my-board/my-image/temp/log.do_rootfs
Installing linux-firmware-wl12xx (0.0+git1+09c949f6d3196a7199eb2c7015bfa5d34ed723b5-r0) to root... so I tried to figure out how this is getting in
% bitbake my-image -g
% grep firmware *.dot
... comes up empty

Quoted 8 lines

To be fair, I had originally built this image with this in <my-board>.conf MACHINE_EXTRA_RRECOMMENDS = " kernel-modules linux-firmware-wl12xx " but that has since been removed. Somehow, it's ghost lingers on...

How can this be?
How can I get rid of it, short of a complete rebuild?

Thanks for any insight into this mystery.

Found it myself - the variable MACHINE_EXTRA_RRECOMMENDS was referenced by my core task, something like this:

  RRECOMMENDS_task-my-distro-boot = "\
    ${MACHINE_EXTRA_RRECOMMENDS} \

"
I hadn't rebuilt that task, so the reference remained. I'm still not sure why it didn't end up in the .dot graphs though.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#2 lore raw
Quoted 23 lines · On Tuesday 06 March 2012 10:39:10 Gary Thomas wrote:
Quoted 13 lines · Gary Thomas

I'm trying to figure out why a particular package is ending up in my final image. If I build something like this:
% bitbake my-image
If I then look, I find packages that were installed that I'm never mentioning:
% grep firmware tmp/work/my-board/my-image/temp/log.do_rootfs Installing linux-firmware-wl12xx (0.0+git1+09c949f6d3196a7199eb2c7015bfa5d34ed723b5-r0) to root... so I tried to figure out how this is getting in
% bitbake my-image -g
% grep firmware *.dot
... comes up empty

Quoted 8 lines

To be fair, I had originally built this image with this in <my-board>.conf MACHINE_EXTRA_RRECOMMENDS = " kernel-modules linux-firmware-wl12xx " but that has since been removed. Somehow, it's ghost lingers on...

How can this be?
How can I get rid of it, short of a complete rebuild?

Thanks for any insight into this mystery.

Quoted 7 lines

Found it myself - the variable MACHINE_EXTRA_RRECOMMENDS was referenced by my core task, something like this:

   RRECOMMENDS_task-my-distro-boot = "\
     ${MACHINE_EXTRA_RRECOMMENDS} \
   "

I hadn't rebuilt that task, so the reference remained. I'm still not sure why it didn't end up in the .dot graphs though.

The dot graphs produced by bitbake -g will include what's projected by the recipes, not already built packages; thus why after your change it no longer appeared in the graphs. The answer is not to effectively make changes to the tasks without bumping the task recipe's PR (or alternatively enable BasicHash).

FYI you can enable buildhistory (without enabling BUILDHISTORY_COMMIT if you don't need that) and this will produce some dependency graphs directly from the packages used to construct the rootfs. These graphs are more focused and thus can be a bit more useful when you're trying to figure out how a package got into your image; however producing them is part of do_rootfs so you have to go through the entire process of building the image in order to get them.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw

How do you enable buildhistory?
Thanks

În data de 06.03.2012 21:27, "Paul Eggleton" <[email protected]> a scris:

Quoted 16 lines · On Tuesday 06 March 2012 10:39:10 Gary Thomas wrote:
Quoted 14 lines · Gary Thomas
Quoted 13 lines

I'm trying to figure out why a particular package is ending up in my final image. If I build something like this:
% bitbake my-image
If I then look, I find packages that were installed that I'm never mentioning:
% grep firmware tmp/work/my-board/my-image/temp/log.do_rootfs Installing linux-firmware-wl12xx (0.0+git1+09c949f6d3196a7199eb2c7015bfa5d34ed723b5-r0) to root... so I tried to figure out how this is getting in
% bitbake my-image -g
% grep firmware *.dot
... comes up empty

Quoted 1 line
Quoted 1 line
Quoted 1 line

To be fair, I had originally built this image with this in

<my-board>.conf

Quoted 16 lines
Quoted 8 lines
Quoted 7 lines

MACHINE_EXTRA_RRECOMMENDS = " kernel-modules linux-firmware-wl12xx " but that has since been removed. Somehow, it's ghost lingers on...

How can this be?
How can I get rid of it, short of a complete rebuild?

Thanks for any insight into this mystery.

Quoted 7 lines

Found it myself - the variable MACHINE_EXTRA_RRECOMMENDS was referenced by my core task, something like this:

   RRECOMMENDS_task-my-distro-boot = "\
     ${MACHINE_EXTRA_RRECOMMENDS} \
   "

I hadn't rebuilt that task, so the reference remained. I'm still not sure why it didn't end up in the .dot graphs though.

Quoted 2 lines

The dot graphs produced by bitbake -g will include what's projected by the recipes, not already built packages; thus why after your change it no

longer

Quoted 1 line

appeared in the graphs. The answer is not to effectively make changes to

the

Quoted 4 lines

tasks without bumping the task recipe's PR (or alternatively enable BasicHash).

FYI you can enable buildhistory (without enabling BUILDHISTORY_COMMIT if

you

Quoted 1 line

don't need that) and this will produce some dependency graphs directly

from

Quoted 1 line

the packages used to construct the rootfs. These graphs are more focused

and

Quoted 1 line

thus can be a bit more useful when you're trying to figure out how a

package

Quoted 1 line

got into your image; however producing them is part of do_rootfs so you

have

Quoted 1 line

to go through the entire process of building the image in order to get

them.

Quoted 12 lines

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#4 lore raw
Quoted 1 line · Foinel

How do you enable buildhistory?

add
INHERIT += "buildhistory"
to your local.conf

Quoted 1 line

Thanks

#5 lore raw
Quoted 6 lines · On Tuesday 06 March 2012 13:50:53 Khem Raj wrote:
Quoted 1 line · Foinel

How do you enable buildhistory?

add
INHERIT += "buildhistory"
to your local.conf

Indeed. FYI there is a small amount of documentation on buildhistory here:

https://wiki.yoctoproject.org/wiki/Buildhistory

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre