From owner-freebsd-current@FreeBSD.ORG Sun Jul 27 11:02:56 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BABE1065679 for ; Sun, 27 Jul 2008 11:02:56 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.183]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6B98FC0C for ; Sun, 27 Jul 2008 11:02:54 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: by ik-out-1112.google.com with SMTP id c30so5172545ika.3 for ; Sun, 27 Jul 2008 04:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=f7bC1oZMoK8PukV2PiobAl3+1sLoHusqHtjNKJuHKsM=; b=P6086oUVd0HdtZgBEYG1V1C99fMWG/iR4SNC5wWWdAoD8Y+ev9xHdJfN+EqaQhcKXD DoIhMytZ/zYrwy2vwYxTp4dA1aaL6OFXTzHmDa7Sn02P8mP1yPTJML4Qslk1YZbussa8 0z3OUVbpih96Q+UBiX6ADO3+lH24Vuq/yup0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=eTrJinIx+4oqBtMCxBgbEm7GogEsE0JTzzuSCvbCWdqoFmnFDrNMZ6DwD+165ArV2U DBRKvDpOez6F+pA0mUudbpuyNfVTDQX4xyBEJJIlWxnOlEIRYLSTyWq+69xa3Pu2yZ4o KSW6q+iwfxHq+3gIap0z1cgllhL78R4S/oyFg= Received: by 10.210.39.20 with SMTP id m20mr4371135ebm.49.1217156573767; Sun, 27 Jul 2008 04:02:53 -0700 (PDT) Received: by 10.210.62.13 with HTTP; Sun, 27 Jul 2008 04:02:53 -0700 (PDT) Message-ID: Date: Sun, 27 Jul 2008 04:02:53 -0700 From: "Mehmet Erol Sanliturk" To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Installation of FreeBSD : Installation of Packages . X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2008 11:02:56 -0000 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