Comments (1)
This is not as simple as the sudo or xterm options.
The download command isn't simply run, it's highly integrated.
The .deb files are downloaded in batch by writing a special aria2c syntax job file format to stdin, and parsing the stdout to monitor progress while working.
To support a different downloader, you would need to write a whole different "driver" for that downloader, essentially a replacement DownloadManager.vala (also other parts would need to be decoupled a little to make it so all the special bits are inside DownloadManager, to allow drop-in replacement of some other DownloadManager, but that's not a problem)
Never the less I've always wanted this to be configurable too.
I think I should do 2 things.
1 - Make AsyncTask more generic and clean up the seperation so that everything special to aria2c is all just inside DownloadManager, and then it would be possible to have other versions of DownloadManager that drop in without having to change anything else. I've been planning to do that to make a version that uses libcurl instead of an external executable.
2 - That would be nice just on principle but in addition to that it would be useful to have an option like the xterm option where there is both internal and external options, where even if the internal option is all integrated, the external options are simpler where they DO just run the command with only a simple string substitution for the url and filename etc. This method of operating would be less efficient since it would have to run the command once per individual file, and it's a lot of files. But that's ok as long as the good reference method is still always available built-in.
There is still a bit of a problem with special settings like proxy. Each different downloader would have it's own different way of doing that. I guess that will have to be handled by supplying more special tokens similar to printf format specifiers, like instead of %s for string, maybe %u for url and %p for proxy, etc, or maybe do them as environment variables like ${URL} , ${PROXY}, etc.
Hm, I guess we could even still support batch mode by having a variable for a url list. At run-time, we decide whether to run a loop if single-file downloads or a single batch download by just looking at the configured command to see which it has ${URL} or ${URLLIST} in it.
The checksums would be a little more work. Righ now it hands the checksums to aria2c, and aria2c is what checks the checksums. With any other command, we'd have to do our own checksum verification.
Similarly we'd have to provide progress monitoring by repeatedly statting the partial download file instead of reading the progress from the command output, or we just accept the progress being messier by just dumping the commands progress output to stdout instead of generating our own progress bar.
I guess I've just convinced myself it's doable.
from mainline.
Related Issues (20)
- Kernel Locked ? HOT 1
- 6.5 kernel breaks system, as it Depends: libc6 (>= 2.38) but 2.37-0ubuntu2 is installed HOT 2
- Kubuntu 23.04 - cannot install 6.4.13 (previous 6.4.x kernels are fine) ... depends on libc6 (>= 2.38) HOT 2
- libc6 broken depenency HOT 2
- Missing 6.1.54 HOT 2
- Older kernels (< 6.0) not showing HOT 1
- Not show any kernel HOT 6
- why is main line not showing updates HOT 1
- ARM Support? HOT 1
- Kernel v6.7-rc1 not installable? HOT 4
- Segmentation fault when trying to install any kernels HOT 7
- ubuntu 24.04? HOT 1
- Installed a kernel and got this error HOT 2
- mainline install-latest stuck on 6.7.3 HOT 1
- Cant remove 6.5.0.17.17 on Ubuntu 22.04.4 HOT 1
- feature request: update linux-firmware HOT 1
- Flatpak mainline / Github Sponsorship HOT 1
- Feature request: Add a column with the release date of the kernel version HOT 2
- Logo is from Synaptic or possibly Ubuntu. Replace it with one that isn't someone else's. HOT 1
- Mainline 1.4.10 does not launch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mainline.