Red Hat Bugzilla – Bug 558516
RFE: Better groups exclusion support
Last modified: 2010-03-30 04:00:38 EDT
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.
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.
Created attachment 386829 [details]
anacdump.txt from testing with updates.img
testing with anaconda-18.104.22.168-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
File "/usr/lib/anaconda/backend.py", line 191, in doBasePackageSelect
File "/usr/lib/anaconda/dispatch.py", line 201, in moveStep
rc = stepFunc(self.anaconda)
File "/usr/lib/anaconda/dispatch.py", line 124, in gotoNext
File "/usr/lib/anaconda/gui.py", line 1156, in nextClicked
File "/usr/lib/anaconda/gui.py", line 1290, in keyRelease
AttributeError: KickstartData instance has no attribute 'packages'
Same thing with anaconda-22.214.171.124-2 and latest nightly build.
Can you give the same test another try with the same updates image?
Tested again with latest nightly and the updates.img. my ks.cfg has:
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.
Created attachment 386858 [details]
anaconda.log from testing with updates.img
Not sure I quite understand what's going on here. James - anaconda is simply calling:
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?
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?
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:
for pkg in self.tsInfo.conditionals.get(txmbr.name, ):
...post 5.5, I'm happy to propose a force=False arg. to deselectGroup() to have that behaviour.
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.
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.
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.
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
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.
This works with RHEL5.5-Server-20100129.nightly/anaconda-126.96.36.199-2/pykickstart-0.43.8-1 on x86_64
Automated RHTS job:
No file conflicts are present, postgresql, samba and freeradius packages are installed. Their conflicting counterparts are not as expected. Moving to VERIFIED.
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.