Bug 8336 - [internalsolv] Problem when upgrading a package which depends on a new package (old issue #32)
Summary: [internalsolv] Problem when upgrading a package which depends on a new packag...
Status: ACCEPTED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided minor
Target Milestone: ---
Assignee: Alex Stewart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-09-20 19:58 UTC by Alejandro del Castillo
Modified: 2021-07-20 18:22 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro del Castillo 2015-09-20 19:58:52 UTC
What steps will reproduce the problem?
1. Install a package A which depends on B
2. Update the package A which now depends on C, but C conflicts with B
3. Try to upgrade :)

What is the expected output? What do you see instead?

What we should expect:
root@terminal:# opkg upgrade -force-defaults -autoremove
Upgrading A on root from 1.0-r0.1 to 2.0-r0.1...
Downloading ...
Installing C (1.0-r0) to root...
The following packages conflict with C: B 
B is now orphaned, uninstalling...

What I see:
root@terminal:# opkg upgrade -force-defaults -autoremove
Upgrading A on root from 1.0-r0.1 to 2.0-r0.1...
Downloading ...
Installing C (1.0-r0) to root...
Collected errors: * ERROR: The following packages conflict with C: * B *

Originally filed on Dec 9, 2009
-----------------------------------------------------------------------------
#1 pixdamix (Feb 10, 2010)
Might be resolved using "Replaces", switch to low priority
Labels: -Priority-Medium Priority-Low 

#2 paul.betafive (Sep 28, 2013)
If C conflicts with B but does not replace B it should still disappear due to the 'autoremove' flag. It's probably a rare case so I'll keep the priority as low but I agree this is a bug.
Labels: Milestone-1.0

#3 ericaustinyu (Jul 10, 2015)
Here is some insight into how apt-get handles this case.

apt-get's upgrade command states:

Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, nor are packages that are not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. 

Note that apt-get has autoremove as a separate command rather than as an option and expecting autoremove to change the behavior of upgrade could complicate things. 

Here is what apt-get does with this setup with different commands:

apt-get upgrade:
'a' is held back at version 1.0 

apt-get upgrade a:
'b' is removed, 'c' is installed, 'a' is upgraded to 2.0

apt-get dist-upgrade:
'b' is removed, 'c' is installed, 'a' is upgraded to 2.0
Comment 1 Alejandro del Castillo 2016-05-17 20:10:04 UTC
The libsolv backend follows the same behavior as apt. This is an internasolver-only issue