Package Management

Gerard Beekmans gerard at linuxfromscratch.org
Thu Jul 6 05:45:41 PDT 2000


> After having successfully installed the LFS system and a few other programs like sshd, apache, php, etc...  i reallize the end result is nothing but a mess that somehow magically works!

what one thinks is a mess somebody else thinks is an organized bunch of
files (if you have installed LFS literally over a hundred time one gets
used to all the files and almost knows exactly which files belongs to
what package). For the 10th time or so here's one thing you can do
without needing to install a package system (I still feel if I start
using RPM I'm just building RedHat from scratch. Or when I start using
deb I start building a Debian system from scratch more or less).

All my packages are installed in /usr/packagename except the stuff
that's in /bin and /sbin (there are still a few things in /usr/bin but
I'm gradually removing them and installing the corresponding packages to
/usr/packagename).

Yes, this brings some overhead. You need to update the PATH statement
everytime you install a new package. You need to update ld.so.conf and
sometimes you have to create symlinks from /usr/package/lib to /usr/lib
and /usr/package/include to /usr/include but only in a handful of cases.

This makes it, for me since I do like this way, real easy to upgrade
or remove something. A simple "rm -r /usr/packagename" removes a program
completely. In some cases I choose to have it's config files (the ppp
and chatscript ones for example) in /etc so I'll have to remove those
manually. Then again, I won't be uninstalling ppp ever since I will
always need it. I might upgrade the daemon (which resides in, you guess
it, /usr/ppp) but the scripts will always be part of my system so
/etc/ppp is an acceptable place for me.

My /etc/profile that contains the PATH's looks like this:

QTDIR=/usr/qt

KDEDIR=/usr/kde

INPUTRC=/etc/inputrc

LESSCHARSET=latin1

PATH=/bin:/usr/bin
PATH=$PATH:/usr/ssh1/bin
PATH=$PATH:/usr/ssh2/bin
PATH=$PATH:/usr/gettext/bin
PATH=$PATH:/usr/mpg123/bin
PATH=$PATH:/usr/X11/bin
PATH=$PATH:/usr/jpeg/bin
PATH=$PATH:/usr/libungif/bin
PATH=$PATH:$QTDIR/bin
PATH=$PATH:/usr/tiff/bin
PATH=$PATH:/usr/libxpm/bin
PATH=$PATH:/usr/kde/bin
PATH=$PATH:/usr/windowmaker/bin
PATH=$PATH:/usr/afterstep/bin
PATH=$PATH:/usr/blackbox/bin
PATH=$PATH:/usr/tk/bin
PATH=$PATH:/usr/tcl/bin
PATH=$PATH:/usr/mutt/bin
PATH=$PATH:/usr/procmail/bin
PATH=$PATH:/usr/fetchmail/bin
PATH=$PATH:/usr/ppp/bin:/usr/ppp/sbin
PATH=$PATH:/usr/glib/bin
PATH=$PATH:/usr/gtk/bin
PATH=$PATH:/usr/imlib/bin
PATH=$PATH:/usr/gkrellm/bin
PATH=$PATH:/usr/wmppp/bin
PATH=$PATH:/usr/xchat/bin
PATH=$PATH:/usr/audiofile/bin
PATH=$PATH:/usr/esound/bin
PATH=$PATH:/usr/orbit/bin
PATH=$PATH:/usr/gnome/bin
PATH=$PATH:/usr/bc/bin
PATH=$PATH:/usr/vim/bin
PATH=$PATH:/usr/mysql/bin
PATH=$PATH:/usr/php/bin

CFLAGS="-mcpu=i686 -march=i686 -O3"
CXXFLAGS="-mcpu=i686 -march=i686 -O3"

export QTDIR KDEDIR INPUTRC LESSCHARSET CFLAGS CXXFLAGS PATH

# End

Perhaps a mess and not neatly, but when I removed a package with rm -r
/usr/package I don't have to edit one long PATH statement. I just remove
the corresponding line. I don't know if there's a limit to how long an
environment variable can be, but right now it works fine. I'll see how
long it takes before things go wrong. If the var. becomes too long at
some point I'll think of a new way. 

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list