Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info when no packages are 'available' #2

Open
jskladan opened this issue Jun 14, 2013 · 1 comment
Open

Add info when no packages are 'available' #2

jskladan opened this issue Jun 14, 2013 · 1 comment

Comments

@jskladan
Copy link
Collaborator

The GUI should inform the user when no packages are not added to the 'list' (or to be precise none are put into the bodhi_worker queue). This might be caused by several possibilities (as the code is now)

packagesworker.py

    def load_installed(self, releasever):
            ...
            if installed_timedelta < installed_max_days:
                if rel.startswith('fc') and releasever in rel:
                    if pkg.ui_from_repo == '@updates-testing':
                        self.bodhi_workers_queue.put(pkg)
                        print "putting to queue", pkg
  1. no packages were installed in the last installed_max_days days
  2. no packages from the selected release are installed
  3. no packages from @updates-testing are installed

I'd suggest altering the logic a bit (pseudocode):

    def load_installed(self, releasever):
        ...
        _updates_testing = False
        _max_days = False
        _releasever = False
        ...
            if pkg.ui_from_repo == '@updates-testing':
                _update_testing = True
                installed_timedelta = now - installed
                if installed_timedelta < installed_max_days:
                    _max_days = True
                    if rel.startswith('fc') and releasever in rel:
                        _releasever = True
                        self.bodhi_workers_queue.put(pkg)
                        print "putting to queue", pkg

So we can inform user via GUI, that no packages are shown since

  1. he has no packages from @updates-testing installed (propse a check whether updates-testing is even enabled)
  2. no packages were installed in last X days
  3. no packages from selected release are installed (check the actual release?)
blaskovic pushed a commit that referenced this issue Jul 12, 2013
Merging GUI enhancement and TODO updated
@blaskovic
Copy link
Owner

I have idea to populate the pkg list with some text like 'No packages' and making it disabled.
I will add it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants