[Aptitude-devel] Using views::download_progress

Piotr Galiszewski piotr at galiszewski.pl
Thu Jul 22 11:57:18 UTC 2010


2010/7/22 Daniel Burrows <dburrows at debian.org>:
> On Thu, Jul 22, 2010 at 01:35:26AM +0200, Piotr Galiszewski <piotr at galiszewski.pl> was heard to say:
>> I am implementing package list. I tried to use
>> views::download_progress and views::download_progress and
>> controllers::acquire_download_progress. What is the proper way of
>> using it?
>> I wrote new download_progress which implements
>> views::download_progress. To start download I created
>> download_update_manager. download_signal_log and controller onject. In
>> commandline code there are only to more lines  m.prepare and
>> m.do_download(). Such code crashes for me with sigsegv in
>> pkgAcquire::Run(int). Probably I forgot about something important.
>> Other gui frontends use ui_download_manager instead of this
>> controller.
>
>  I think I need to see what you're doing to see what's wrong.
> And more data, e.g., is it crashing immediately or during the download
> or at the end?  Does valgrind report anything interesting with the
> crash? (although IIRC, valgrind is broken at the moment and prints a lot
> of useless false positives)  Is the cache file full loaded and functional
> when you try to start the download, etc.
>

I found and fixed this problems. Downloading works fine. I was only
surprised that complete is never invoked and error is not really and
error when ignored is set to true ;)

>  I think this should work without the ui_download_manager, although
> you probably want that too.
>

Yes. Currently the gui is frozen during downloading. I am still not
sure how to use both mechanisms in my code, but I have a look on it
now

>  (can't figure out more, may look again in the morning if I have time)
>
>  Daniel
>
-- 
Regards
Piotr Galiszewski



More information about the Aptitude-devel mailing list