dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

Problem when upgrading a package which depends on a new package #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 *

Original issue reported on code.google.com by pixdamix@gmail.com on 9 Dec 2009 at 9:29

GoogleCodeExporter commented 8 years ago
Might be resolved using "Replaces", switch to low priority

Original comment by pixdamix@gmail.com on 10 Feb 2010 at 9:03

GoogleCodeExporter commented 8 years ago
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.

Original comment by paul.betafive on 28 Sep 2013 at 1:20

GoogleCodeExporter commented 8 years ago
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

Original comment by ericaust...@gmail.com on 10 Jul 2015 at 3:15