Add OstreeAsyncProgress, use it for ostree_repo_pull
Several APIs in libostree were moved there from the commandline code, and have hardcoded g_print() for progress and notifications. This isn't useful for people who want to write PackageKit backends, custom GUIs and the like. From what I can tell, there isn't really a winning precedent in GLib for progress notifications. PackageKit has the model where the source has GObject properties that change as async ops execute, which isn't bad...but I'd like something a bit more general where say you can have multiple outstanding async ops and sensibly track their state. So, OstreeAsyncProgress is basically a threadsafe property bag with a change notification signal. Use this new API to move the GSConsole usage (i.e. g_print()) out from libostree/ and into ostree/.
This commit is contained in:
1 parent
9aaa29598e
commit
c65923e642
14 files changed
+501
-52
No files matched your search
@@ -68,7 +68,7 @@ sysrootRepoConfig.set_string(testosRefSection, 'url', 'file://' + upstreamRepo.g
|
||||
sysrootRepoConfig.set_boolean(testosRefSection, 'gpg-verify', false);
|
||||
sysrootRepoConfig.set_string_list(testosRefSection, 'branches', [runtimeRef]);
|
||||
|
||||
sysrootRepo.pull('testos', null, 0, null);
|
||||
sysrootRepo.pull('testos', null, 0, null, null);
|
||||
|
||||
//// TEST: We can deploy one tree
|
||||
|
||||
@@ -111,7 +111,7 @@ sysroot.write_deployments(newDeployments, null);
|
||||
|
||||
libtestExec('os_repository_new_commit');
|
||||
|
||||
sysrootRepo.pull('testos', null, 0, null);
|
||||
sysrootRepo.pull('testos', null, 0, null, null);
|
||||
|
||||
let [,newRev] = upstreamRepo.resolve_rev(runtimeRef, false);
|
||||
|
||||
@@ -137,7 +137,7 @@ print("OK two deployments");
|
||||
|
||||
libtestExec('os_repository_new_commit 0 1');
|
||||
|
||||
sysrootRepo.pull('testos', null, 0, null);
|
||||
sysrootRepo.pull('testos', null, 0, null, null);
|
||||
|
||||
let [,thirdRev] = sysrootRepo.resolve_rev(runtimeRef, false);
|
||||
assertNotEquals(newRev, thirdRev);
|
||||
|
||||
Reference in new issue
Block a user