Bug 10777

Summary: [internalsolv] opkg: recommends are too strong
Product: [Yocto Project Subprojects] opkg Reporter: Markus Lehtonen <markus.lehtonen>
Component: opkgAssignee: Alex Stewart <alex.stewart>
Status: ACCEPTED --- QA Contact:
Severity: normal    
Priority: Medium+ CC: markus.lehtonen, meta.mr.watcher, meta.watcher, richard.purdie
Version: 1.0   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Markus Lehtonen 2016-12-08 15:21:30 UTC
I hit this problem when working on bug 10433. If pkgA is pulled in via recommends but pkgB, being pulled by depends, conflicts with pkgA the installation fails. However, the package manager should give away with pkgA and just be happy installing pkgB, instead, because pkgA is a weak dependency. The deb backend in yocto work this way, for example.

In practice, I tried to make busybox-syslog and sykslogd packages alternative (and exclusive), and making busybox-syslog the default provider for syslogd. I specified

meta/recipes-core/busybox/busybox.inc:
  RRECOMMENDS_${PN} = "busybox-syslog"
  RPROVIDES_${PN}-syslog = "syslog"
  RCONFLICTS_${PN}-syslog = "sysklogd"

meta/recipes-extended/sysklogd/sysklogd.inc:
  RCONFLICTS_${PN} = "busybox-syslog"


With this configuration (and package_ipk enabled), if something pulls in sysklogd do_rootfs fails with:
Collected errors:
 * check_conflicts_for: The following packages conflict with busybox-syslog:
 * check_conflicts_for: 	sysklogd *
Comment 1 Alejandro del Castillo 2017-01-18 21:17:01 UTC
Fixed on the libsolv backend on 3dc89ffd6a9f26ae92e08ec085e5bec73e7c3e2d .

Keeping the bug Open since it's still present on the internal solver, but re-targeting for 1.0 since I am not prioritizing fixes in the internal solver.
Comment 2 Markus Lehtonen 2017-05-04 15:10:36 UTC
You were planning to replace the internal solver with libsolv backend(?) What's the status of that? It would fix this bug
Comment 3 Alejandro del Castillo 2017-05-04 15:22:40 UTC
I switched the default on OE. The change is already in master:

https://patchwork.openembedded.org/patch/137903/

I re-tagged this bug as [internalsolv] to convey that this is still an issue with the internal solver. It's an issue that I am not prioritizing, since the libsolv backend is waaay better, but still worth keeping in buzilla.