Bug 5024

Summary: RPM backend cannot handle RPROVIDES in IMAGE_INSTALL
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, kergoth, liezhi.yang, mark.hatle, meta.mr.watcher, meta.watcher, otavio, sgw, sstncr
Version: 1.5   
Target Milestone: 2.0   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2013-08-20 09:57:47 UTC
If you add a name that is in a package's RPROVIDES but for which no package exists, and you are using the RPM backend, do_rootfs will fail:

 Error: example-name not found in the base feeds (qemux86 i586 i486 i386 x86 noarch any all).

This is not an error from smart but from our code in package_rpm.bbclass which translates all names before passing them to smart. If you use the ipk backend everything works as expected.

I think this highlights why we should not be trying to do so much of this package lookup work ourselves; smart should be doing the heavy lifting where at all possible. If there are quirks in our package architecture handling that we need to support then smart should be fixed to support those.
Comment 1 Mark Hatle 2013-08-20 15:51:31 UTC
I'm not sure if SMART will allow you to install based on a dependency instead of the actual package name.  This is something we will have to explore.

Typically on RPM based systems, installing is done based on package name -- and the dependencies are only for inter-package activities.

We may have to adjust the name translation code to check the RPROVIDES fields and translate that as well.  I think the first step is to check if SMART can even do a dependency based install, and then weigh our options from there.
Comment 2 Mark Hatle 2013-08-20 15:52:29 UTC
One other potential issue w/ a dependency based installed.  Dependencies are "architecture neutral".  So even if dependency based installs work, there is likely no way to tell SMART I want a dependency of a particular architecture type.  (again if dependencies work, that should be verified as well.)
Comment 3 Paul Eggleton 2013-10-01 13:17:31 UTC
I've just checked, smart is capable of handling RPROVIDES and not just package names:

------------ snip ------------
root@qemux86:~# smart install glibc-utils
Loading cache...
Updating cache... ############################ [100%]

Computing transaction...

Installing packages (1):
  eglibc-utils-2.17-r3@i586  

154.8kB of package files are needed. 375.8kB will be used.
------------ snip ------------
Comment 4 Stefan Stanacar 2014-01-10 14:08:27 UTC
*** Bug 5716 has been marked as a duplicate of this bug. ***
Comment 5 Paul Eggleton 2014-11-06 15:37:22 UTC
*** Bug 6918 has been marked as a duplicate of this bug. ***
Comment 7 Paul Eggleton 2014-11-07 10:37:46 UTC
OK, so your fix looks reasonable, but as I tried to convey in the first comment above, I really think that a lot of this logic should be handled by Smart itself. We should be asking it to install a particular package or provider and it should be working out what should provide that item - if at all possible other than the normal OE package name to real package name (e.g. eglibc -> libc6) we shouldn't need to do any translation on the list before sending it to Smart.

Perhaps we can take this fix now and refactor things later, but I worry that refactoring will never get done.
Comment 8 Paul Eggleton 2015-02-16 09:34:57 UTC
I've replied on the mailing list; the fix may be OK but I really think we need some performance impact figures.
Comment 9 Paul Eggleton 2015-02-19 15:58:33 UTC
I'm marking this as M4, and we should be able to take it in M4 if we get overall performance numbers (as Richard noted on the mailing list) and they are reasonable.
Comment 10 Christopher Larson 2015-10-06 18:41:03 UTC
Just a ping to check the status on this, is still still pending performance testing from Hongxu?