Bug 242299

Summary: yum dependency solver fails after a cancelled transaction
Product: [Fedora] Fedora Reporter: Peter Williams <peter>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 7CC: bjohnson, dgunchev, katzj, mail
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-06 17:56:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Yum shell session none

Description Peter Williams 2007-06-03 03:31:11 UTC
I have encountered the following scenario in both the yum shell and pirut.

1) I set up a transaction and ask yum to run it.
2) The depsolver runs and says that I must remove packages X and Y in order
   to satisfy the transaction dependencies.
3) I don't want to remove X and Y so I cancel the transaction
4) I try to run the same transaction
5) This time, the depsolver doesn't mention any extra packages that must be
   removed, and will run the transaction for me.

Here is an example. I am starting from a system with neither bittorrent-gui nor
bittorrent installed:

[peter@epsilon ~]$ sudo yum shell
Loading "kernel-module" plugin
Loading "fedorakmod" plugin
Loading "installonlyn" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
Setting up Yum Shell
> install bittorrent-gui
Setting up Install Process
Parsing package install arguments
> run
--> Running transaction check
---> Package bittorrent-gui.noarch 0:4.4.0-5.fc7 set to be updated
--> Processing Dependency: bittorrent = 4.4.0-5.fc7 for package: bittorrent-gui
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package bittorrent.noarch 0:4.4.0-5.fc7 set to be updated
--> Processing Dependency: python-crypto for package: bittorrent
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package python-crypto.i386 0:2.0.1-7 set to be updated

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 bittorrent-gui          noarch     4.4.0-5.fc7      fedora            109 k
Installing for dependencies:
 bittorrent              noarch     4.4.0-5.fc7      fedora            403 k
 python-crypto           i386       2.0.1-7          fedora            192 k

Transaction Summary
=============================================================================
Install      3 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 704 k
Is this ok [y/N]: n
Exiting on user Command
Transaction did not run.
> ts reset
> install bittorrent-gui
Setting up Install Process
Parsing package install arguments
> run
--> Running transaction check

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 bittorrent-gui          noarch     4.4.0-5.fc7      fedora            109 k

Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 109 k
Is this ok [y/N]: n
Exiting on user Command
Transaction did not run.

If I run the transaction, only the bittorrent-gui RPM will be installed. And of
course the 'bittorrent' program provided in the gui package won't run, because
Python modules provided by the bittorrent package are missing.

Comment 1 Michael Möllney 2007-06-05 16:10:24 UTC
Same effect can be seen within yumex while deinstalling rpms:

First yumex lists the dependencies that must be removed, too.
After cancel and deinstallation of the same package again no dependencies are
listed to be removed.


Comment 2 Doncho Gunchev 2007-06-06 17:13:21 UTC
speedcrunch needs qt4. If I ask yum or pirut-1.3.7-1.fc7 to install speedcrunch,
transaction reset (hit cancel after it shows the deps) and then ask for
speedcrunch again no deps are installed. With pirut-1.3.8-1.fc8 I can't
reproduce it (it always shows qt4 needs to be installed). Maybe bug # 242368 is
related.

Comment 3 Jeremy Katz 2007-06-06 17:56:45 UTC
I fixed this in yum CVS, will be in yum 3.2.1.  pirut-1.3.8 has a (crude)
workaround for the problem.  Hopefully we'll get 3.2.1 pretty soon.

Comment 4 Joni Yrjana 2007-08-05 06:40:17 UTC
Created attachment 160708 [details]
Yum shell session

Comment 5 Joni Yrjana 2007-08-05 06:43:32 UTC
The above is my yum shell session with similar problem with yum 3.2.1. After
transaction reset things are not working as before.. not sure if it works
correctly before transaction reset either. I'm on x86_64.

# yum list yum
Loading "installonlyn" plugin
Installed Packages
yum.noarch                               3.2.1-1.fc7            installed       
#