On Thu, Mar 18, 2010 at 8:53 PM, Ganesan Venkata Subramanian <[email protected]> wrote: > Dear mates > > What is the purpose of a package manager. What are its functions. Please > explain. >
Simple Definition : Package managers are used to install, upgrade and uninstall software on your computer with ease and in an orderly way. In the Unix/Linux World and especially in the Open Source world you will find software released as a set of C program ( or any other language ) files. In order to install that software you need a compiler on your system and typically you run the following command after entering the directory containing the software. $./configure - Configures the software for compilation and installation $make - Compiles the software $sudo make install - Install the software. Once you install the software like this it is a bit difficult to find out what files got installed where and so difficult to remove them and manage them. So what package developers do is they make packages ( make the whole thing into 1 file most of the time compressed ) of these software. And use a program called package manager to install these packaged software. The package manager unpacks the package and reads particular files and installs the software as specified in those files. The package manager also writes details about the package ( such as what files are installed where ) in a package database. This database can be queried to get information about the package during upgrading or uninstalling the software. For example in the OpenBSD Desktop I sit and type this you can use $ pkg_info atk-1.24.0 accessibility toolkit used by gtk+ bzip2-1.0.5 block-sorting file compressor, unencumbered cairo-1.8.8 vector graphics library desktop-file-utils-0.15 utilities for 'desktop' entries enlightenment-0.16.8.15 themed window manager esound-0.2.41v0 sound library for Enlightenment firefox35-3.5 gettext-0.17p0 GNU gettext glib2-2.18.4p3 general-purpose utility library glitz-0.5.6p1 OpenGL image compositing library gtk+2-2.14.7p0 multi-platform graphical toolkit hicolor-icon-theme-0.10p4 high-color icon theme shell for GNOME and KDE imlib2-1.4.2 image manipulation library jasper-1.900.1p0 reference implementation of JPEG-2000 jpeg-6bp5 IJG's JPEG compression utilities libaudiofile-0.2.6p2 SGI audiofile library clone libiconv-1.13 character set conversion library libid3tag-0.15.1bp2 library for reading ID3 tags libungif-4.1.4p1 tools and library routines for working with GIF images pango-1.22.4p0 library for layout and rendering of text pcre-7.9 perl-compatible regular expression library png-1.2.35 library for manipulating PNG images slim-1.3.1 simple login manager slim-themes-1.2.3p2 slim themes bundle sqlite3-3.6.13p0 embedded SQL implementation tiff-3.8.2p4 tools and library routines for working with TIFF images to find the software package installed. Now say you want to find what files were installed by the package manager while installing rdesktop you can use $ pkg_info -L rdesktop Information for inst:rdesktop-1.6.0 Files: /usr/local/bin/rdesktop /usr/local/man/man1/rdesktop.1 /usr/local/share/rdesktop/keymaps/ar /usr/local/share/rdesktop/keymaps/common /usr/local/share/rdesktop/keymaps/cs /usr/local/share/rdesktop/keymaps/da /usr/local/share/rdesktop/keymaps/de /usr/local/share/rdesktop/keymaps/de-ch /usr/local/share/rdesktop/keymaps/en-dv /usr/local/share/rdesktop/keymaps/en-gb /usr/local/share/rdesktop/keymaps/en-us /usr/local/share/rdesktop/keymaps/es /usr/local/share/rdesktop/keymaps/et /usr/local/share/rdesktop/keymaps/fi /usr/local/share/rdesktop/keymaps/fo /usr/local/share/rdesktop/keymaps/fr /usr/local/share/rdesktop/keymaps/fr-be /usr/local/share/rdesktop/keymaps/fr-ca /usr/local/share/rdesktop/keymaps/fr-ch /usr/local/share/rdesktop/keymaps/he /usr/local/share/rdesktop/keymaps/hr /usr/local/share/rdesktop/keymaps/hu /usr/local/share/rdesktop/keymaps/is /usr/local/share/rdesktop/keymaps/it /usr/local/share/rdesktop/keymaps/ja /usr/local/share/rdesktop/keymaps/ko /usr/local/share/rdesktop/keymaps/lt /usr/local/share/rdesktop/keymaps/lv /usr/local/share/rdesktop/keymaps/mk /usr/local/share/rdesktop/keymaps/modifiers /usr/local/share/rdesktop/keymaps/nl /usr/local/share/rdesktop/keymaps/nl-be /usr/local/share/rdesktop/keymaps/no /usr/local/share/rdesktop/keymaps/pl /usr/local/share/rdesktop/keymaps/pt /usr/local/share/rdesktop/keymaps/pt-br /usr/local/share/rdesktop/keymaps/ru /usr/local/share/rdesktop/keymaps/sl /usr/local/share/rdesktop/keymaps/sv /usr/local/share/rdesktop/keymaps/th /usr/local/share/rdesktop/keymaps/tr Sometimes package managers shows instructions after installing a package the user should follow to get the package working. When a software is compiled and the compiled stuff is packaged it is called a binary package. It is the easiest to install but it is operating system ( unless you turn on emulation ) specific and hardware architecture specific. Source packages dont have this limitation but they need to be compiled beofre the software can be installed. A few examples are http://openports.se/ http://www.netbsd.org/docs/software/packages.html http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html One of the first package managers was from Slackware ( even before rpm ) http://www.slackbook.org/html/package-management.html Modern package managers do something called dependency management. That is they find out if any other software in needed to install and run a package and installs them first. Still Confused ? fell free to ask :-) --Siju _______________________________________________ Indian Libre User Group Cochin Mailing List http://www.ilug-cochin.org/mailing-list/ http://mail.ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org #[email protected]
