[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH rhel6-branch] Use progressbar instead of waitwindow for repo setup (#584996)

Chris Lumens wrote:
We can set callback for URLGrabber - that is download part
of repo setup so let's use pulse progress bar here. For sack
setup, we don't have usable callback, and also it is pretty
quick so let's keep using wait window for it.

I am not using normal (growing) progress bar for repo setup
because I would have to update it per downloaded repo metadata
file which would be needlessly fine-grained feedback for user.

In general, I'm not a fan of adding more progress callbacks to
yuminstall.py.  We have enough of those things already.  Doesn't yum
provide us with something we can use here?

I am using what yum provides, using yum's urlgrabber callback ...

> +class RepoSetupPulseProgress:
> +    def __init__(self, intf):
> +        self.intf = intf
> +        self.repo = None
> +
> +    def connect(self, repo):
> +        self.repo = repo
> +        if repo.name is None:
> +            txt = _("Retrieving installation information.")
> +        else:
> + txt = _("Retrieving installation information for %s.")%(repo.name) > + self.window = self.intf.progressWindow(_("Installation Progress"),
> +                                               txt,
> +                                               1.0, pulse=True)
> +        repo.setCallback(self)

... here (setCallback is method of YumRepository).

But I have problem with what Bill suggested - busy cursor being
preferred to pulse progress bar - that's exactly the opposite
of what the bug requires. For me, the pulse bar here suggests that
something is really happening more than the busy cursor
(mainly due to non-regularity of its pulsing :), but that
may be just my and reporter's feeling. Alternatively, I could
use regular progress bar each downloaded file, but as I say in the
comment for the commit, it seems like overkill to me.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]