Bug 603177

Summary: unexpected packages are installed when a back button is pressed in confirminstall
Product: Red Hat Enterprise Linux 5 Reporter: Masahiro Matsuya <mmatsuya>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: atodorov, cww, james.antill, tao, tmlcoch
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-11.1.2.227-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 06:53:06 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
proposed patch none

Description Masahiro Matsuya 2010-06-11 18:33:39 UTC
Description of problem:

The customer noticed that the number of packages installed can be different
depending on the steps they follow during the installation.

Case A:
1. At the software selection, select "Customized later"
   and press next.
2. At this point, dependency check happens.
3. Go "Back"
4. Select "Customize now" and press next.
5. Deselect "Sound and Video" group in "Applications"
6. Press next and dependency check happens
7. Press next again and the installation begins

Case B:
1. At the software selection, select "Customize now"
   and press next.
2. Deselect "Sound and Video" group in "Applications"
3. Press next and dependency check happens
4. Press next again and the installation begins

The customer noticed that the packages libao and libmusicbrainz are installed only at case A. These packages should be installed only when "Sound and Video" is selected.

Version-Release number of selected component (if applicable):
anaconda-11.1.2.209-1.x86_64

How reproducible:
Always

Steps to Reproduce:
Please see Case A and Case B above.
  
Actual results:
In Case A, libao and libmusicbrainz are installed.

Expected results:
In Case A, libao and libmusicbrainz are not installed.

Additional info:

When a back button is pressed in confirminstall, all dependencies found in postSelection should be removed. I created a proposed patch to use _undoDepInstalls() for it. 

_undoDepInstalls() removes all packages having isDep=1. What I am understanding is that this function is used to revert the package list into the situation before postSelection(). If this is correct, this function doesn't work now.
Because buildTransaction() can set isDep=1 even for the packages selected in basepkgsel if it is depended from any package. As the result, _undoDepInstalls()
removes more packages than expected. When a back button is pressed in confirminstall, it's returned to tasksel (or group-selection), not basepkgsel.
So, some of the packages removed by_undoDepInstalls(), which are not depended by any remaining packages, will not installed at the end.

In my patch, I saved the list of packages at the begining of doSelection() and set isDep=0 for the saved packages after buildTransaction().

This worked on my test box (kvm guest, x86_64). I'll attach the patch soon.

Comment 1 Masahiro Matsuya 2010-06-11 18:41:18 UTC
Created attachment 423369 [details]
proposed patch

Comment 2 Masahiro Matsuya 2010-06-11 18:51:09 UTC
s/doSelection/doPostSelection/

Comment 9 RHEL Program Management 2011-03-07 16:03:38 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 11 Alexander Todorov 2011-05-10 14:07:57 UTC
Tested with RHEL5.7 0430.2 tree:

Followed the steps to reproduce:

> Case A:
> 1. At the software selection, select "Customized later"
>    and press next.
> 2. At this point, dependency check happens.
> 3. Go "Back"
> 4. Select "Customize now" and press next.
> 5. Deselect "Sound and Video" group in "Applications"
> 6. Press next and dependency check happens
> 7. Press next again and the installation begins
> 

After install libao and libmusicbrainz were not installed. Moving to VERIFIED.

Comment 12 errata-xmlrpc 2011-07-21 06:53:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0984.html