[f20-branch/rhel7] Do error checking of repository names on "Installation Source" screen.

David Shea dshea at redhat.com
Thu Oct 24 12:33:26 UTC 2013


On 10/21/2013 05:37 PM, mulhern wrote:
> Resolves fedora #985103
>
> Addresses several possible errors the user can make in the choice of additional
> repository names. Also, corrects a bug whereby if two repositories swap names
> one repository picks up the other repository's data.
>
> The errors the user can make which are addressed are:
>
> 1) Badly formatted names, currently defined as those outside the format accepted
> by Yum or empty strings.
>
> 2) Name conflicts, where the user selects a repo name which anaconda is already
> using.
>
> 3) Duplicate names in the list of additional repositories.
>
> The changes are:
>
> *) A warning label is added below the Name Entry box and
> manipulated appropriately on badly formatted names or name conflicts.
>
> *) A warning label is added in the repositories grid, below the list of
> repositories, and manipulated appropriately when duplicate repository names are
> entered.
>
> *) If the user does choose duplicate repository names, a warning message is
> displayed at the bottom of the screen using set_warning.
>
> *) When the user presses Done, if there are duplicate entries, the repo changes
> are not saved and the user remains on the installation source spoke.
>
> *) The error messages returned from status() method are separated out a bit, so
> that one sees different messages for self._error and not self.payload.baseRepo
> and not self._currentIsoFile
>
> *) Removal of repos from addOns is based on original names of repos in the list
> presented to the user, rather than their current names.
>
> *) The addOn list is updated as if each change were executed in parallel, so
> that swapping two repo names works correctly.
>
> *) The default name of a new repository is changed from "New Repository" to
> "New_Repository" and so is well-formed.
>
> *) The tooltip on the Reset button now says "Revert to the previous list of
> repositories" rather than "Revert to the default list of repositories".
>
> *) Made default_repos a field of the YumPayload class rather than file level
> for easier access via payload object.
>
> Notes: Some lines are removed by glade from source.glade without my
> intervention. They all are property elements with attribute
> name="use_action_appearance". I think this has no effect on the screens.
>
> PyGobject does not handle the editing-done signal properly, so the changed
> signal is the only signal that can be used to detect any changes in the Name
> field. Thus, names are checked, and may be assigned, on every keypress, instead
> of just when the user presses enter. This is frustrating but it has been true
> for a long time, so it's just the way it works.
>
> Code in yumpayload.py may disable a repo that the user had enabled. The user
> will not see any message notifying them of this if it occurs. Ideally, some
> useful message should show up when the user gets back to the hub. The enabled
> checkboxes are updated properly if the user re-enters the spoke. It might
> be useful to have a Verify button in the Additonal Repos grid so that the
> user can ask for the verification on the additional repo through the screen.
>
> Signed-off-by: mulhern <amulhern at redhat.com>
>
> Conflicts:
> 	pyanaconda/ui/gui/spokes/source.glade
> ---
>   pyanaconda/packaging/yumpayload.py    |   7 +-
>   pyanaconda/ui/gui/spokes/source.glade | 118 +++++++++++++++++++++++++----
>   pyanaconda/ui/gui/spokes/source.py    | 139 ++++++++++++++++++++++++++++------
>   3 files changed, 222 insertions(+), 42 deletions(-)
>
>
Looks good to me.


More information about the anaconda-patches mailing list