Software Updater is the HELL...Why don't make it more progressive?


This is just for say That I will have 2 times a trouble with the Software Updater in the last times of Downloading Packages. This is hell…Spend a lot of time to Download 103/104 Package and BOOM I have this error message.


Why don’t save the packages that are already on the disk? Why don’t install anything because only ONE package is not downloaded?

Because the app you want to install need all dependencies and if not all is installed the ibstallatikn is broken. This reduce data trabs on your disk.

This problem is known and there is assigned ticket for it:

(more on that in this thread)

Hopefully, some fair solution will be found soon.

1 Like

Sorry if this has been covered before, but with some of the package managers I have used, it downloads the package and checksum files to a temporary package cache directory then when it is done it verifys the checksums again and if they are all valid then installs the packages. If a checksum is invalid, it deletes the package and the checksum. (That way it doesn’t have to redownload the packages that are already downloaded and if a package gets corrupted it can redownload it)

Is there a technical/practical reason pkgman doesn’t do something similar? (Im asking because I want to know what approach would be best for pkgman)


There isn’t a reason besides the fact that it simply hasn’t been implemented yet. Ideally, pausable and resumable network requests through Haiku would need to be implemented first. Any contributions are welcome of course! :wink: (I may even take a look at this myself if I have time…)


HTTP Range Requests, to resume a partial download, are as easy as open()ing an existing file and adding a header (if the server supports it; you will need to add some verification.)

But before we implement that, the Package Kit should just retry 3 times or something like that instead of instantly failing.

No. Someone just has to write the code, and it shouldn’t even be a very hard thing to do. If you’re looking for ways to help Haiku and know a little C++, that would be a great way to get started :slight_smile:


As noted in the related thread I will try to look at this within the next few weeks. I’ve been out of Haiku development for a while but I would like to get back into it, and in the summer I was already working on the Package Kit.

I need to dig into the code but I imagine I will just add some retries to start off with, and maybe see what can be done for resuming. We certainly should not be throwing away 100 packages when the 101st fails.

I looked into it more and I see I misunderstood how packagekit worked. It allows creating multiple transaction directories, I’m guessing to allow simultaneous transactions? Does anyone know how best to deal with this?

Actually pkgman update also does it sometimes… it’s not specific to the frontend.

Multiple parallel transactions are implemented, but not actually working. All transactions except first will fail on finish.

Would it be a good idea to have a lock file for each transaction, that way you will be able to resume from the transaction directory with the biggest number that isn’t locked, or should I do something else?