From owner-freebsd-questions@FreeBSD.ORG Sat Sep 6 11:13:14 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD42106566B for ; Sat, 6 Sep 2008 11:13:14 +0000 (UTC) (envelope-from jstrother9109@gmail.com) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.232]) by mx1.freebsd.org (Postfix) with ESMTP id 061378FC17 for ; Sat, 6 Sep 2008 11:13:13 +0000 (UTC) (envelope-from jstrother9109@gmail.com) Received: by qb-out-0506.google.com with SMTP id e34so1199599qbe.35 for ; Sat, 06 Sep 2008 04:13:13 -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=IXP9F1FfBh8Epy+1hrEKOOlfF2eA/z4kJliy3Qs3I18=; b=mLT4ylJ7GLPc+wGKiYc4y8AZQfJYcKcFI6GgN4e26yls5jHJV/Yvovwmnz9ZAr1+8M ulJ7PVz/MFD8KrHYAZcrGvyutiMuJttshYtSkKQlX5zP8J9vPrho1B5aunucWLJoZmux OpW47KZftgwyXpZy0R73fUksXWEbg2Ae16cqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hqwI3T7bKq/ErlCztTxTpNxBV+jhC7asP3Wgvf7+lt6qC2ghI2jBaGHEkoTaUyJFjr FUqHho7kTpKTOon/9MZMcUFNvlFXMDLj2ZRIquGlwxWclJQGToHlTCQnKXnbevzb4S4g fNBFjnI/ZI3173jPs+UIarv/98dAkBqgbPZd4= Received: by 10.103.227.13 with SMTP id e13mr8662133mur.49.1220698745909; Sat, 06 Sep 2008 03:59:05 -0700 (PDT) Received: by 10.103.165.4 with HTTP; Sat, 6 Sep 2008 03:59:05 -0700 (PDT) Message-ID: <4b2381fb0809060359u53f85d06u4696d527063c5e4d@mail.gmail.com> Date: Sat, 6 Sep 2008 03:59:05 -0700 From: "James Strother" To: freebsd-questions@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: switching discs during install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2008 11:13:14 -0000 I just completed an install of FreeBSD 7.0 and couldn't help but wonder why it was necessary for me to switch discs back and forth so much while installing ported applications. I've used FreeBSD on and off for a number of years and this issue has always irked me a just a little bit. It means that I have to babysit the installation and it really does increase the time required to perform the installation. This is, of course, a minor issue in the grand scheme of things but it seems easy enough to remedy. I assume that as packages are installed the dependencies are checked, and then required packages are installed as necessary. When a required package is on a different disc, then the installer prompts the user to switch discs. However, it should be necessary to organize packages on the discs and during the installation such that this never occurs. In case this isn't obvious, let me give a quick supporting argument. If you were to perform an installation in which every package was installed, then the installer would eventually resolve all dependencies and produce an ordering in which every package could be installed without violating its dependencies. If we removed a package that was not required by any other package, then clearly the same ordering could still be used to install the remaining packages without violating any dependencies. By extension, any number of packages could be removed and the ordering would remain valid provided that the remaining packages did not depend on a removed package. So, if the packages are placed on the discs in this order and the installer attempts to install packages in this order, then the dependencies will always be satisfied and the user will never have to switch discs. (As an aside, this is really only to say that the dependency tree is a directional acyclic graph and it has a topological sort). There multiple orderings which satisfy this condition. Perhaps the easiest is to calculate is the ordering in which packages are sorted by the number of packages that require it. This ordering would also tend to aggregate the most common packages on the first discs. Is there a reason that this wouldn't work. Something I'm not thinking about.