Red Hat Bugzilla – Full Text Bug Listing
|Summary:||RFE: Better groups exclusion support|
|Product:||Red Hat Enterprise Linux 5||Reporter:||Alexander Todorov <atodorov>|
|Component:||anaconda||Assignee:||Anaconda Maintenance Team <anaconda-maint-list>|
|Status:||CLOSED ERRATA||QA Contact:||Alexander Todorov <atodorov>|
|Version:||5.5||CC:||james.antill, jantill, pholica|
|Target Milestone:||beta||Keywords:||FutureFeature, TestBlocker|
|Fixed In Version:||anaconda-22.214.171.124-1||Doc Type:||Enhancement|
|Doc Text:||Story Points:||---|
|Last Closed:||2010-03-30 04:00:38 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||554717, 555311|
Comment 1 Alexander Todorov 2010-01-25 10:23:41 EST
Cloning against anaconda then. Please see the file conflict in bug #552219. QE is still seeing this even with *-@conflicts. 552219 is probbaly a duplicate of this one.
Comment 3 Chris Lumens 2010-01-25 10:56:34 EST
If you have a tree with pykickstart-0.43.8, can you add updates=http://clumens.fedorapeople.org/558516.img and see if this fixes the problem? Thanks.
Comment 6 Alexander Todorov 2010-01-26 08:22:58 EST
Created attachment 386829 [details] anacdump.txt from testing with updates.img Chris, testing with anaconda-126.96.36.199-1, pykickstart-0.43.8-1.el5 and your updates.img gave me a traceback. Full anacdump.txt is attached. Traceback (most recent call first): File "/tmp/updates/kickstart.py", line 1099, in setGroupSelection self.ksdata.packages.excludedGroupList) File "/usr/lib/anaconda/backend.py", line 191, in doBasePackageSelect anaconda.id.instClass.setGroupSelection(anaconda) File "/usr/lib/anaconda/dispatch.py", line 201, in moveStep rc = stepFunc(self.anaconda) File "/usr/lib/anaconda/dispatch.py", line 124, in gotoNext self.moveStep() File "/usr/lib/anaconda/gui.py", line 1156, in nextClicked self.anaconda.dispatch.gotoNext() File "/usr/lib/anaconda/gui.py", line 1290, in keyRelease self.nextClicked() AttributeError: KickstartData instance has no attribute 'packages' Same thing with anaconda-188.8.131.52-2 and latest nightly build.
Comment 7 Chris Lumens 2010-01-26 10:08:04 EST
Can you give the same test another try with the same updates image?
Comment 8 Alexander Todorov 2010-01-26 10:32:49 EST
Tested again with latest nightly and the updates.img. my ks.cfg has: %packages * -@conflicts Anaconda was able to proceed to packages installation step. After calculating dependencies it showed a message with file conflicts. anaconda.log shows that postgresql-devel conflicts with postgresql84-devel although postgresql84-devel is in the conflicts group. This is on i386 virtual machine. Will attach anaconda.log shortly.
Comment 9 Alexander Todorov 2010-01-26 10:36:12 EST
Created attachment 386858 [details] anaconda.log from testing with updates.img
Comment 10 Chris Lumens 2010-01-26 11:32:19 EST
Not sure I quite understand what's going on here. James - anaconda is simply calling: map(anaconda.backend.deselectGroup, self.ksdata.excludedGroupList) where self.ksdata.excludedGroupList is just a list of group names. Down in deselectGroup in yum/__init__py:2216, I'm hitting the ValueError there because txmbr.groups is empty for at least one of the packages in the @conflicts group. Therefore, we continue and never remove the package. I know this is a pretty weird corner case, so it's entirely likely this is supposed to be the proper behavior. Is there perhaps a different method I should be calling to make sure all packages in the conflicts group get removed?
Comment 11 James Antill 2010-01-26 12:26:01 EST
Yeh, deselectGroup() is just meant to undo selectGroup() ... and we never call it internally. It's even documented that way. I agree that the "instantly stop+return when we hit a package not from the group" is bad though, I think that's an obvious fix (atm. what gets "deselected" depends on the order of packages we hit ... so that's bad). But I don't think that fix is what you want either, is it? I think what you really want is "selectRemoveGroup()" no? Ie. go through the group and try to remove each package whether it's in other groups or was selected manually etc?
Comment 12 James Antill 2010-01-26 12:31:59 EST
Wait, we don't return we continue ... so ignore my obvious fix comment. I think deselectGroup is dtrt. But I'm positive that's not the API you want now (at least atm.). It might be easier, esp. for 5.5 to just paste the (untested) quick: for grp in yb.comps.return_groups(grpid): for pkgname in grp.packages: for txmbr in self.tsInfo: if txmbr.po.name == pkgname and txmbr.po.state in TS_INSTALL_STATES: yb.tsInfo.remove(txmbr.po.pkgtup) for pkg in self.tsInfo.conditionals.get(txmbr.name, ): self.tsInfo.remove(pkg.pkgtup) ...post 5.5, I'm happy to propose a force=False arg. to deselectGroup() to have that behaviour.
Comment 13 Chris Lumens 2010-01-26 13:38:06 EST
You're suggesting I put that into yuminstall.py for rhel5 anaconda? And yes, we will definitely want something here for rhel6 and Fedora as well, since we support the same group removal syntax there.
Comment 14 James Antill 2010-01-26 15:42:11 EST
yeh, putting that into yuminstall directly for RHEL-5 is probably easiest. I can probably get the API updated for RHEL-6, and backport to 5.6 if you want to get rid of your code.
Comment 15 Chris Lumens 2010-01-26 17:04:06 EST
Alexander - can you try one more time with the same updates image? I've got an install going here that's installing packages, but it's not going to be done in time for me to see if it's working completely tonight. We got past the transaction test, though.
Comment 16 Alexander Todorov 2010-01-27 07:42:20 EST
Chris, with the RHEL5.5-Server-20100117.0 tree and the updates.img I got this traceback: File "/tmp/updates/backend.py", line 150 def removeGroupsPackages(self, grp, *args) ^ SyntaxError: invalid syntax same with latest nightly
Comment 17 Chris Lumens 2010-01-27 11:39:56 EST
Okay, I've fixed that locally and given it a test here. I have confirmed that no postgresql84-* packages are installed, which I believe is the desired behavior here.
Comment 20 Alexander Todorov 2010-02-01 09:55:56 EST
This works with RHEL5.5-Server-20100129.nightly/anaconda-184.108.40.206-2/pykickstart-0.43.8-1 on x86_64 Automated RHTS job: http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=121612&type=Single ks.cfg has: %packages * -@conflicts No file conflicts are present, postgresql, samba and freeradius packages are installed. Their conflicting counterparts are not as expected. Moving to VERIFIED.
Comment 22 errata-xmlrpc 2010-03-30 04:00:38 EDT
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-2010-0194.html