Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
since i'm an idiot, i have decided that i am going to build a linux package manager in rust. i'm planning to host the packages on a github repo, unless you can convince me to do otherwise. i've already got a basic sketch for a package format in my head, but i have a few questions.
1. my package manager is focused on speed, so should i use lzo, lz4, or zstd for the quickest decompression speeds?
2. how can i implement install, uninstall, query, and upgrade commands?
3. how can i make the program source configuration files (mirrors, xfer settings, etc)?
4. once i have mastered the basics, how can i implement more advanced stuff like an alternatives system and dependency management?
If speed is the actually THE focus, then don’t compress at all.
Dependencies would be modeled using a data structure called a “directed acyclic graph”, and queried using algorithms named “depth first search” and “topological sort”.
I would suggest you to read how the debian and rpm based package managers work (like apt and zypper amongst others), how they handle dependencies, how they look for packages at all...
What does install, uninstall, (reinstall), query, remove, update, upgrade (rollback?) mean?
How can we create and maintain a deb or rpm mirror...
What to do in case of an error (to keep the system in a consistent state....)
Reading your post, the only listed reason I can see for you doing this is 'speed.'
Is that really justification? Is package management really slowing you down? What niche does this fill? Who is your anticipated end-user?
The list of questions I could ask is pretty long, but let's just start there. They're mostly rhetorical anyhow.
If you're doing it for a hobby, to learn, or just to spend some time (or whatever), that's just fine. After all, it's your time that's going to be invested. But, do you expect it to take off, have input from other developers, maybe make it as a default in a distro some day?
Before writing a line of code, I'd better define your reasons and your expectations. I'd establish a clear goal, pick a project management solution, and start lining up goals. I'd query potential users for their expectations and see if they align with your expectations.
Again, it's your time. I'm just expressing what I'd do before committing to a time investment. Personally, I expect consistency, reliability, stability, and (reasonably) bug-free operation from a package manager. Speed is way down on the list of my priorities. I suspect that's true for most Linux users.
since i'm an idiot, i have decided that i am going to build a linux package manager in rust. i'm planning to host the packages on a github repo, unless you can convince me to do otherwise. i've already got a basic sketch for a package format in my head, but i have a few questions.
1. my package manager is focused on speed, so should i use lzo, lz4, or zstd for the quickest decompression speeds?
2. how can i implement install, uninstall, query, and upgrade commands?
3. how can i make the program source configuration files (mirrors, xfer settings, etc)?
4. once i have mastered the basics, how can i implement more advanced stuff like an alternatives system and dependency management?
1. Make it work first, worry about compression later
2. That question is too wide. Do you have any coding experience at all?
3. That's very basic stuff. Do you have any coding experience at all?
4. Make the basics work first, worry about this later
All in all, your post reads more like "Can you recommend me some good beginners' coding tutorials".
Not a package manager as such (doesn't uninstall!), however I wrote a parallel-tasking dependency-managing Slackware package builder in about 5 days solid. I'm sure I would need to triple that to do the same thing in Rust. https://github.com/bifferos/afterpkg
Python will give you all the libraries you need and instant compile time, if you really want it in Rust, I'd convert it after you've got it working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.