Merge lp:~mandel/ubuntuone-control-panel/autoupdate into lp:ubuntuone-control-panel
| Status: | Merged |
|---|---|
| Merged at revision: | 310 |
| Proposed branch: | lp:~mandel/ubuntuone-control-panel/autoupdate |
| Merge into: | lp:ubuntuone-control-panel |
| Diff against target: |
227 lines (+121/-1) 7 files modified
ubuntuone/controlpanel/gui/qt/gui.py (+11/-0) ubuntuone/controlpanel/gui/qt/main/windows.py (+4/-0) ubuntuone/controlpanel/gui/qt/tests/__init__.py (+7/-0) ubuntuone/controlpanel/gui/qt/tests/test_gui.py (+20/-1) ubuntuone/controlpanel/utils/__init__.py (+2/-0) ubuntuone/controlpanel/utils/tests/test_windows.py (+60/-0) ubuntuone/controlpanel/utils/windows.py (+17/-0) |
| To merge this branch: | bzr merge lp:~mandel/ubuntuone-control-panel/autoupdate |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Natalia Bidart | Needs Fixing on 2012-04-05 | ||
| Leo Arias (community) | Needs Information on 2012-04-02 | ||
| Brian Curtin (community) | 2012-04-02 | Approve on 2012-04-02 | |
|
Review via email:
|
|||
Commit Message
- Added simple autoupdate implementation based on the code found in the ubutnuone-
Description of the Change
- Added simple autoupdate implementation based on the code found in the ubutnuone-
- 309. By Manuel de la Peña on 2012-04-02
-
Pass the gui module to check updates.
- 310. By Manuel de la Peña on 2012-04-02
-
Ask a question when you do as a question.
| Brian Curtin (brian.curtin) wrote : | # |
That's better. The code looks fine and the IRL tests have been working.
| Leo Arias (elopio) wrote : | # |
I followed your instructions and got the update message. As Brian said, the message is better as a question and seems to be working fine.
Were we just testing that the message appears or the actual upgrade? If it was just the first, make this a +1. If it was the upgrade, I got an error saying that it couldn't copy a file. Tomorrow morning I'm available for more testing if needed, just ping me.
| Manuel de la Peña (mandel) wrote : | # |
The most probable cause of the error is that the pacakage found on the server side is not an update or that no package was found, lets make sure whenever you are in IRC.
| Natalia Bidart (nataliabidart) wrote : | # |
The module utils can not depend on the module gui.qt, since utils is being distributed in the base package which is in the Ubuntu default install. The allowed dependency is the other way around: gui.qt depends (already) on utils.
Also, this branch generates a circular dependency between utils -> gui.qt -> utils.
So, the solution to this is having the code in MainWindow should what check_updates does, importing utils and calling utils.are_
As soon as this is fixed, I'm happy to re-review.
| Manuel de la Peña (mandel) wrote : | # |
Please take another look because there is no dependency between utils and the gui modules. The utils.check_updates takes a parameter which is the gui module to use that has the ask question method, the check_updates method is used the main.windows module which has a dependency with the qt.gui module.
This means that:
* Utils does not depend on any gui module. The only dependency is found in the windows tests which can be remove by not using patch and just passing and object that implements the required gui method.
* All logic is in the utils module.
* There is a dependency between windows.main and qt.gui.
Do I make sense?
| Natalia Bidart (nataliabidart) wrote : | # |
> * Utils does not depend on any gui module. The only dependency is found in the
> windows tests which can be remove by not using patch and just passing and
> object that implements the required gui method.
> * All logic is in the utils module.
> * There is a dependency between windows.main and qt.gui.
>
> Do I make sense?
Yes, sorry, I stated the dependency wrong. Anyways, the ubuntu_sso.main module can not depend on the gui.qt module, since the former is part of the base package, like I mentioned before.
So, the way to solve this is having the gui.qt module doing the check and raising any needed confirmation dialog, so we keep having the gui.qt module depending on utils, like we do so far.
Since you're in holidays and we need this ASAP, I'm proposing a fix for this at:
https:/
you can review it if you like :-P (but no need to do so).


I think the UI that gets displayed when an update is found needs some work. Rather than "There is a new update available", we need to ask a question if they want to install it since we have yes/no buttons.
Something like "There is a new update available. Would you like to install it?"