[rhinstaller/anaconda/pulls/220 master] act on the right objects when stripping URL protocols (#1243962)

AdamWill installerbot-noreply at redhat.com
Fri Jul 17 16:42:50 UTC 2015


Revised with a suggestion from @dashea to do it by having the combo box handlers emit the changed signal for their corresponding URL entry boxes, which is simpler and avoids the inadvisable practice of having different widgets use the same handler function (the repo protocol combo box no longer uses the repo URL box handler directly).

While working this out and testing it I noticed a buglet with this process:

1. Set the URL protocol to http://
2. Type `https://www.foo.com` in the entry box
3. Change the URL protocol to https://

For both the base repo and additional repo implementations, after steps 1 and 2 you see a warning bar "Protocol in URL does not match selected protocol", which is good. Again, for both, after step 3, the 'https://' is stripped from the URL (so it's now just `www.foo.com`), which is also good. But for the base repo the 'protocol does not match' warning is cleared immediately - which is correct - while for the additional repo the warning remains until you make some other change.

I think this is because, somewhat oddly, the way the checks are run differs pretty significantly between the two implementations. The base URL has this `_updateURLEntryCheck()` method (which is called in several places, including `refresh()` and `_urlCheck` validator; the additional repo URL entry boxes don't have anything like that, and only get the checks run by the change handlers.

I think that buglet was there all along, though, so it shouldn't hold up this change - this fixes the crash and makes things work, I think, at least as well as they did before efa549e. I've tested it with an updates.img and fiddling around with both URL entry things quite a bit.
-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/220


More information about the anaconda-patches mailing list