Merge lp://staging/~free.ekanayaka/landscape-client/changer-after-smart into lp://staging/~landscape/landscape-client/trunk
Proposed by
Free Ekanayaka
Status: | Merged |
---|---|
Approved by: | Muharem Hrnjadovic |
Approved revision: | 217 |
Merged at revision: | not available |
Proposed branch: | lp://staging/~free.ekanayaka/landscape-client/changer-after-smart |
Merge into: | lp://staging/~landscape/landscape-client/trunk |
Diff against target: |
1029 lines (+370/-83) 15 files modified
landscape/broker/broker.py (+10/-0) landscape/broker/remote.py (+8/-0) landscape/broker/tests/test_remote.py (+32/-0) landscape/lib/fs.py (+7/-0) landscape/lib/tests/test_fs.py (+27/-2) landscape/manager/packagemanager.py (+5/-0) landscape/manager/tests/test_packagemanager.py (+17/-0) landscape/package/changer.py (+11/-1) landscape/package/facade.py (+7/-2) landscape/package/reporter.py (+51/-24) landscape/package/taskhandler.py (+5/-0) landscape/package/tests/test_changer.py (+26/-1) landscape/package/tests/test_facade.py (+12/-1) landscape/package/tests/test_reporter.py (+139/-52) landscape/package/tests/test_taskhandler.py (+13/-0) |
To merge this branch: | bzr merge lp://staging/~free.ekanayaka/landscape-client/changer-after-smart |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Muharem Hrnjadovic (community) | Approve | ||
Thomas Herve (community) | Approve | ||
Review via email: mp+22601@code.staging.launchpad.net |
Description of the change
This is ready for review. I've real-world tested it, and it seems to solve the problem. There's a change in SmartFacade.
To post a comment you must log in.
[1] detected( results) : deinit( ) fire_event( "package- data-changed" ) results( [self.detect_ packages_ changes( ), package_ locks_changes( )]) addCallback( changes_ detected)
+ def changes_
+ # Release all smart locks, in case the changer runs after us.
+ self._facade.
+ if True in results:
+ # Something has changed, notify the broker.
+ return self._broker.
+
+ result = gather_
+ self.detect_
+ return result.
I'm not sure if this matters, but deinit() will only be called if both operations succeed. If there is a lock, it may not be cleaned if an exception is raised.
It's a tricky change, but it looks good. Lots of testing will be involved :). +1!