Installation of FreeBSD : Installation of Packages .

From: Mehmet Erol Sanliturk <m.e.sanliturk_at_gmail.com>
Date: Sun, 27 Jul 2008 04:02:53 -0700
Dear Sirs ,

Installation of packages requires a large number of CD interchanges which it
may seem "endless" .
I am reading messages about this issue on freebsd-current showing easy
solutions to this fact
but new beginners using only installation CDs may not know these  solutions
.

The placement of packages may be made in such an order that this CD
interchanging may be completely eliminated .


A possible solution may be the following :

-------------------------------------------------------------------------------------------


This is a "topological sort" problem .


Assume that a dependency file generated from packages :


Package a depends on ( Package b , Package c , ... )
Package b depends on ( Package m , Package n , ... )

...

Package s depends on ( )

...

Package z depends on ( Package k , ... )


By using this file as input , a program may perform a "topological sort" of
the packages and
may give a list of packages that any packages listed in n-th ( n > 1 )
position depends ONLY on packages
listed from first to (n-1)-th packages .

Packages installed up to ( selection and installation point of packages )
may be taken as first
entries as marked "Installed" in the list because they are already installed
and they does not depend on packages to be installed .

By using the above results and preparing SysInstall part with the above
output ,
packages may be inserted into the CDs by dividing them into suitable group
parts for CD1 , CD2 , etc. .

It is not necessary to sort the packages during the installation , because
package installation lists will be designed with respect to the above
results
and will be put into installation disks .

--------------------------------------------------------------------------------------------


To the installer person a list of packages is presented in the alphabetical
order .

After selection completed by the installer person , the marked packages are
re-marked in the topologically listed packages list .

Assume that first part of the list is in the CD one , second part is in the
CD two , ... , and so on .

The package installer starts from the first marked package in the
topologically sorted list to install and
continues .
During installation of packages in the CD 1 , the other CDs never will be
requested because
any package will not depend on any packages on the following CDs .

In this way , all the CDs will be installed without requiring any CD
interchange .

Packages giving cycle may be placed into last CD . Since all of the packages
up to that CD is
installed , they will not need previous CDs . Cycling packages may be
installed by ignoring dependency
in the prior installed packages and in this way , their installation may be
completed .

---------------------------------------------------------------------------------------------


A search of "topological sort" in www.freebsd.org site gives zero results (
when "sort" related
entries are ignored , or only "topological" searched ) .


In http://sourceforge.net a search of "topological sort" , is giving 318
results .


In http://www.boost.org ( Boost C++ Libraries ) , The Boost Graph Library (
BGL ) contains
algorithms about topological sort and related data structures .

Information about "topological sort" may be found within the following books
( among many others ) :

http://www.amazon.com/Introduction-Structures-Algorithms-Prentice-Object-Oriented/dp/0135791782/ref=sr_1_7?ie=UTF8&s=books&qid=1217136846&sr=1-7

http://www.amazon.com/Algorithms-Data-Structures-Leen-Ammeraal/dp/0471963550/ref=sr_1_16?ie=UTF8&s=books&qid=1217137473&sr=1-16
( Topological Sorting : Detecting Cycles , p. 257 )
Cycle giving packages may be inserted at the end of the list and into the
last CD .

http://www.amazon.com/Data-Structures-via-Objects-Evolution/dp/0195108434/ref=sr_1_17?ie=UTF8&s=books&qid=1217137473&sr=1-17

http://www.amazon.com/Objects-Abstraction-Data-Structures-Design/dp/0471467553/ref=sr_1_21?ie=UTF8&s=books&qid=1217137473&sr=1-21

http://www.amazon.com/Structures-Algorithms-Program-Style-Using/dp/087150099X/ref=sr_11_1?ie=UTF8&qid=1217138766&sr=11-1


-----------------------------------------------------------------

Thank you very much ,

Mehmet Erol Sanliturk
Received on Sun Jul 27 2008 - 09:02:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC