Bug 7840 - Smart package manager problems
Summary: Smart package manager problems
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-06-03 08:49 UTC by Vaduva Alexandru
Modified: 2015-06-15 09:05 UTC (History)
2 users (show)

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


Attachments
image build info (1.80 KB, text/plain)
2015-06-03 08:49 UTC, Vaduva Alexandru
no flags Details
patch info (1.13 KB, text/plain)
2015-06-03 08:49 UTC, Vaduva Alexandru
no flags Details
bitbake -e core-image-minimal output (810.48 KB, application/octet-stream)
2015-06-04 09:01 UTC, Vaduva Alexandru
no flags Details
do_rootfs log output (950.63 KB, application/octet-stream)
2015-06-04 09:02 UTC, Vaduva Alexandru
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vaduva Alexandru 2015-06-03 08:49:06 UTC
Created attachment 2537 [details]
image build info

I experiences a problem related to smart package manager that I wanted to discuss with you. I was interested in your feedback, knowledge of this and maybe advices on how should we proceed further.

The bug I experienced can be duplicated with the information available in the "patch-info.txt" file attached to this email.
I also attached the log of the error for easier read in the "image-build-info.txt" file.

After some careful investigation I discovered that the problem is caused by the smart package manager, after the install_complementary function call when it in fact tries to call smart with "install --attempt -y" arguments. It is not able to see the fact that those packages were already installed and tries to do it again.
This error behavior might also be related to the problems mentioned here:
https://www.mail-archive.com/yocto@yoctoproject.org/msg24279.html
and https://bugs.launchpad.net/smart/+bug/1238492

Thanks again for all your help. If any further information would be required I will be more than happy to share it.
Comment 1 Vaduva Alexandru 2015-06-03 08:49:57 UTC
Created attachment 2538 [details]
patch info
Comment 2 Vaduva Alexandru 2015-06-04 09:01:57 UTC
Created attachment 2540 [details]
bitbake -e core-image-minimal output
Comment 3 Vaduva Alexandru 2015-06-04 09:02:33 UTC
Created attachment 2541 [details]
do_rootfs log output
Comment 4 Vaduva Alexandru 2015-06-04 09:05:31 UTC
error link: http://pastebin.com/v5aGejyq
It is not machine or architecture dependent since it was replicated on both qemuppc and qemux86.
Comment 5 Paul Eggleton 2015-06-04 13:57:12 UTC
I have now reproduced this with qemuppc. However, in this instance the warnings are not cause for alarm - looking at the log, the rootfs construction code is explicitly asking smart to install the named packages on the command line, and it happens that those packages are already installed - so it's just warning you that it's not going to do anything with those. 

In case it's not clear, smart gets invoked twice as part of rootfs construction - once to install the main list of packages, and a second time to bring in "complementary" packages e.g. -dev and -dbg packages for every package installed in the first invocation (where available). In this instance some of the -dev/-dbg packages are already in the image after the first invocation because they are dependencies of one of the packages that's going into the image - I believe most of these are coming in through packagegroup-buildessential's dependency on libstdc++-dev (and in turn packagegroup-buildessential is in there because tools-sdk is being added to IMAGE_FEATURES).

The other aspect of this is that these warnings almost certainly aren't new - they were exposed in 1.8 when we started checking the do_rootfs log for warnings. I suspect the correct course of action here is to patch smart to make this an informational message rather than a warning, as even when invoking smart manually, asking smart to install a package that's already installed is not really a problem that merits a warning IMO.
Comment 6 Paul Eggleton 2015-06-08 10:09:26 UTC
I've sent a fix for this (along with a semi-related fix for how the warnings are reported):

http://lists.openembedded.org/pipermail/openembedded-core/2015-June/105799.html
Comment 7 Vaduva Alexandru 2015-06-09 07:15:13 UTC
Reviewed and tested it.
All OK. Bug can be marked as resolved.
Comment 8 Paul Eggleton 2015-06-15 09:05:28 UTC
Fix was merged to master in:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e5a11759d8d6f15191167ab1f3ffb3db8b6715aa

We probably ought to backport this to fido as well.