LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why use package management? (https://www.linuxquestions.org/questions/linux-software-2/why-use-package-management-550065/)

bryankaplan 04-30-2007 02:32 AM

Why use package management?
 
Hi all. I'm hoping someone can educate me about the virtues of package management. I'm pretty new to Linux, and I'm learning as I go, but no matter how much I learn this is the one question that lingers. I was using WinXP up until about 9 months ago, when I finally decided that I've had enough with using a system that I don't really own. So I tried out a bunch of distros and settled on Slackware, which suits me well. I am at home on the command line, and so installing software from source seems quite natural to me. Furthermore it seems that doing so is almost always necessary in order to select my desired configuration. As far as I understand, configuration is not possible with package managers. Is that incorrect? I frequently read people extolling package management as some kind of essential feature, and passing judgment on distros based (at least in part) on their package management features. Even if package managers really do allow for full configuration of the software, what's the big deal about typing ./configure; make; sudo make install;? What's the big deal about simply rm'ing files you no longer want? I also frequently read about the infamous Dependency Hell, which I have yet to experience. Maybe this is because I haven't used Linux long enough, but I suspect it's because I restrict myself to simple text-mode software. I have never read any argument against the use of package management, though, so I'm guessing that I'm really missing out. Please fill me in. What's so good about it?

MS3FGX 04-30-2007 03:14 AM

Most people would rather just click on the name of a program from a list and have the system automatically sort out the downloading and installation of said program and it's dependencies. While many people are still happy to compile things from source, especially those looking for complete control over the system, it is just not something that is suitable for the average computer user. It is no coincidence that the current favorite distribution for the beginners, Ubuntu, makes very heavy use of apt-get, making it very easy for the end user to update and upgrade their machine.

Beyond that, there are very good reasons to create and use installable packages rather than just installing from source all the time. When installing from source, you can never be sure if the makefile will have an "uninstall" target, which could lead you to having software installed on your computer that you simply cannot remove without going in manually. Without any form of packaging, you also won't be able to tell what file is in what package, making it much harder to figure out dependency issues when they do arise.

Downloading and compiling your own software is great, but you should then build that software into a package to make system maintenance easier. checkinstall is excellent for that, supporting Slackware .tgz, Debian .deb, and RPM packages.

slakmagik 04-30-2007 03:27 AM

There's no big deal about typing './configure; make; sudo make install'. Once. But have you done it for years with dozens, even hundreds of packages? And not all packages are like that - many of my packages have patches and complex './configure --this --and --that' lines and so on and so forth. And I know what packages depend on what because my needs are usually simple and I can keep it in my head, but installing a dinky little python script like 'trac', when it depends on clearsilver, sqlite, pysqlite, swig, and a specially compiled subversion (because Slack's uses different options) can be an adventure.

All in all, it can get kind of old. (Hence my taking another crack at Debian.)

Incidentally, doing the make/makeinstall routine and randomly rm'ing stuff isn't necessarily the best way to go. Many people use checkinstall and some like me use build scripts and makepkg.

On the other hand, it is very true that installing binaries is far less flexible. I have to build mrxvt even on Debian (just like I did subversion on Slackware) because the binaries don't cut it. Debian is far more flexible than some others, with several variants of several packages and highly split binary packaging, but you do lose a lot. Gentoo, with its use flags, is a whole different kettle of monkeys - package management that isn't binary. So the two aren't mutually exclusive.

Anyway - if I were possessed of infinite energy and enthusiasm, I'd say slapping in a solid base system with slack and compiling what I want on top is the best way to go. However, I'm a little tired and I'm resting with 'apt-get foo' and just seeing if I can live with it. ;) It is nice to just have the stuff installed with a command and have other people paying attention to updates. Not having to trawl freshmeat and various websites and whatnot. But going back the other way yet again, while adding a new package to an 'unmanaged' system can be a pain, it's not that bad afterwards, since it's mostly automated.

I dunno - I haven't actually messed with trac (to use that example again) on debian but, on arch, it was damn nice to say 'pacman -S trac' or whatever it was and just have it happen, vs. the long adventure of making it work on slack.

-- Damn, took me a long time to write that. I didn't even see MS3FGX's post, but agree with it. Occurred to me to add, that one downside of packaged and managed distros is quality control - if you use something like Slack and build everything else yourself, you know any problems are between you and Pat. (Or at least it was usually that way - it seems more and more of Slack is being contributed - no offense to the guys doing it, but it does sort of spoil the purity of things. ;) ) Anyway - in most package-management distros, you've got an awful lot of cooks in the kitchen.

oneandoneis2 04-30-2007 03:52 AM

Install LinuxFromScratch, and build it up to being a fully-working box with X windows, multimedia, and everything else.

If chasing down all the dependencies for dependencies for dependencies every time you want to install something new doesn't explain to you why package managers are considered important, nothing will :)

reverse 04-30-2007 04:05 AM

I suggest you take a look at Source Mage GNU/Linux, and this: http://wiki.sourcemage.org/FAQ/Gentoo/Philosophical

bryankaplan 04-30-2007 04:43 AM

Thanks very much for each of your replies.
Quote:

Originally Posted by MS3FGX
Downloading and compiling your own software is great, but you should then build that software into a package to make system maintenance easier. checkinstall is excellent for that, supporting Slackware .tgz, Debian .deb, and RPM packages.

This info regarding checkinstall is especially useful. I checked out its homepage, and it sounds great. I'll start using it immediately.
Quote:

Originally Posted by reverse
I suggest you take a look at Source Mage GNU/Linux, and this: http://wiki.sourcemage.org/FAQ/Gentoo/Philosophical

Wow! This is great! All of the control of building from source with the benefits of dependency management and a friendly textual interface! I will be testing this out soon for sure. Thank you!

Hangdog42 04-30-2007 06:43 AM

Since you're using Slackware, be sure to check out Slackbuilds.org. It has Slackware build scripts for quite a fair amount of useful software. They are very picky about the scripts, so the packages that get built are good.


All times are GMT -5. The time now is 03:38 PM.