Reasons against a linux-like package manager?
There seems to be a consensus on the fact that Haiku should have a package manager unlike the ones in most Linux distributions. It is very strange to me, I think Linux has a superior software installation system that: 1) does not use more space than required, 2) provides quick and easy updates, 3) allows easy installation of software and such programs as Ubuntu's "Software Center", 4) allows the system to manage its files whichever way is more effective and efficient.
Two reasons against it (that I found) are:
1) Dropping a folder or unzipping an archive is simpler and more elegant than "software installation". Why so? In Ubuntu, you can install any program by browsing the Software Center and clicking install next to what you're interested in and uninstall next to whatever you want to see gone. What can be simpler and more elegant than that?
2) Each program should be in a specific location and shouldn't scatter files all over the system. Again, is there a strong enough reason for this (especially to the casual user, who doesn't know or care about this stuff) that leads people to prefer it over a more effective system where files are grouped by their function: binaries with binaries, libraries with libraries, fonts with fonts etc. It seems that making a system purely based on bundles is extremely ineffective while making some programs use bundles and some not is extremely inelegant.
The bottom line: I think that Linux-like package management (while (very arguably) inelegant) simply works very well. From both the system's perspective (having an organization of files that is most effective) and the user's perspective (being able to click "install" and "uninstall" without having to care about what's going on behind the scenes). I've been a Linux user for only four years, but in those years I've never had a dependency problem on my Ubuntu and Debian systems, "dependency hell" seems to be a thing of the past.
Reading some stuff on the internet, I see lots of people arguing for non-installation systems while failing to provide tangible reasons for them. I hope someone can explain to me what this is all about.
By the way, for any dev that may be reading this, Haiku totally rocks my socks off!
Here is my list of downfalls of bundles:
Most applications will be dependent on libraries. I see two implementations:
Fat bundles. There are two problems with these:
- Libraries need updating, some updates are crucial to security, how are you going to update a library inside a bundle? Is Haiku going to peek into each bundle? Is Haiku going to have a secondary location for libraries? If so, what's the point of including them in bundles in the first place?
- Some libraries are so huge that putting them in fat bundles would be just crazy. Say you have 10 Qt applications. You're not going to have 10 copies of Qt in your filesystem, right?
Have a secondary linux-like package manager which will take care of libraries. There are two ways to do this:
- Provide an installation script with the bundle. If so, why not have a real package manager in the first place?
- Make Haiku look for libraries each time you run the program and offer to install missing libraries. What if the user downloaded a bundle, copied it into his file system thinking how easy and user-friendly installation is and then went offline only to find out that he can't use the program
- Fat bundles. There are two problems with these:
- So I installed a couple of Qt apps. The Qt library magically appeared somewhere. Now I want to uninstall them by deleting the bundles. Will the Qt library remain? If so, my system is sure to get polluted with tons of unused libraries. Will Haiku detect that no application requires it and delete the library as well? That's better, but shouldn't I decide? What if I plan on installing something else later? What if I have a limited internet connection? What if I am using the library for developing my own software?
I think that bundles are far more inelegant and ineffective than a linux-like package manager. They will be a mess to maintain, they are inconsistent by design, they obscure reality and confuse the user with false ideas (the impression that an application exists entirely in a folder is simply wrong because it doesn't take into account the libraries that are doing much of the heavy lifting).
Furthermore, it is silly to argue that downloading a bundle and unzipping/copying it into some place in the filesystem is easier than just pressing "install" in a software manager.
Here are some arguments for a centralized repository:
- Source code can be pushed to the repository and can be automatically compiled to multiple processor architectures. Look here: http://www.debian.org/ports/ do you think each Haiku developer would have ported his app to all of these? No, we would be lucky to have amd64 supported, and there will be almost nothing compiled for any other system.
- Updates are easy and quick. How do you see an upgrade on a Haiku-like system? Will each bundle have its own update checker?
- Installation is EASY. How on earth is looking for the developer's website, downloading a gigantic fat bundle taking care to choose the right one for your processor (explain that to my grandma) easier that just clicking "install" in a software manager next to the app you want??
- There is only one copy of each library and it stays updated. As I said previously, if you have 20 copies of the same library in 20 bundles, who's going to be updating them and how? Some updates, I point out again, are critical, security stuff, do you expect every developer to be on top of security issues of each library he is using and to quickly provide new gigantic bundles whenever a security update comes out? C'mon!
- Developers won't have to host and maintain their websites. Open source developers may not want to waste their time with web design, but without a centralized repository, you are forcing each developer to host their own programs, and each user to dig through butt-ugly websites to find what he needs. A solution to this is having a website like bebits.org, but if you're going to have a centralized software source like bebits, you might as well have a centralized repository, which does that and much more.
Haiku has to embrace the Open Source world. If you expect companies to eagerly start porting their proprietary apps to Haiku you are wrong. On the other hand, to tell an open source developer to bundle his applications with all the libraries, to host those fat bundles (multiple huge bundles for each app -- x86, amd64, ppc etc.) on his own website and keep them updated with all the libraries is to tell him to go f*ck himself. Not in 2010.
UPDATE 3: It was pointed out to me that Qt binaries are quite small, I actually didn't check before posting. A better example would have been something like Mono.