Bug 160966 - Download progress callbacks not invoked
Summary: Download progress callbacks not invoked
Status: RESOLVED FIXED
: 116386 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: libzypp (show other bugs)
Version: Beta 8
Hardware: Other Other
: P5 - None : Blocker (vote)
Target Milestone: ---
Assignee: Stanislav Visnovsky
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-27 15:33 UTC by Jiří Suchomel
Modified: 2007-01-25 11:17 UTC (History)
2 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Suchomel 2006-03-27 15:33:37 UTC
When DoneProvide callback returns "C", it should abort the commit process (but it doesn't).
Comment 1 Ladislav Slezák 2006-03-27 16:33:43 UTC
DoneProvide is called when an object is downloaded (error should be zero in this case). Zypp doesn't allow to pass a result, returned value from yast is ignored.

I enhanced pkg-bindings in SVN to call DoneProvide callback when a problem occurr during download (error argument should be non-zero), the return value of the callback ("C" = ABORT, "R" = RETRY) is passed to zypp.

To abort during download use ProgressProvide callback.

Please test it and provide feedback.
Comment 2 Jiří Suchomel 2006-03-29 07:23:41 UTC
I do not know how to check the failure of download, so I just removed the check for user input in DoneProvide and DonePackage.
Comment 3 Ladislav Slezák 2006-03-29 12:11:48 UTC
Use the error argument of the callback handler (the first argument), zero value means finished without problem, non-zero means an error occurred during download (the return value from the callback is passed to zypp in this case).

Is it OK? How can I help you?
Comment 4 Jiří Suchomel 2006-03-29 14:26:54 UTC
I know, I mean I am not able to reach the real failure (so the error would be non-zero).
Comment 5 Ladislav Slezák 2006-04-03 10:45:10 UTC
Fixed in pkg-bindings-2.13.43

If it still doesn't work properly then reopen...
Comment 6 Jiří Suchomel 2006-04-06 08:21:25 UTC
OK, so now I'm using CallbackProgressProvide and CallbackProgressPackage, but when I return false for these functions (which should mean abort), nothing happens.
Comment 7 Jiří Suchomel 2006-04-06 13:08:06 UTC
So, this is for Stano...
Comment 8 Stanislav Visnovsky 2006-04-06 19:11:31 UTC
The download progress callbacks should return true if they are going to be aborted.
Comment 9 Jiří Suchomel 2006-04-07 06:55:47 UTC
CallbackProgressProvide and Pkg::CallbackProgressPackage are mapped to OnlineUpdateCallbacks::PatchProgressCallback, which returns false only if user clicks abort or cancel, otherwise it returs true. The update process never aborts.
Comment 10 Stanislav Visnovsky 2006-04-07 09:10:49 UTC
Looks like download progress callback does not work as it should.
Comment 11 Stanislav Visnovsky 2006-04-07 12:48:50 UTC
Of course it does not work, because it is never invoked.
Comment 12 Stanislav Visnovsky 2006-04-07 15:40:59 UTC
Fixed in rev. 3007
Comment 13 Michael Andres 2007-01-25 11:17:38 UTC
*** Bug 116386 has been marked as a duplicate of this bug. ***