From owner-freebsd-stable Tue Nov 28 11:38:19 2000 Delivered-To: freebsd-stable@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 058F637B400; Tue, 28 Nov 2000 11:38:13 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA08244; Tue, 28 Nov 2000 14:38:05 -0500 (EST) (envelope-from wollman) Date: Tue, 28 Nov 2000 14:38:05 -0500 (EST) From: Garrett Wollman Message-Id: <200011281938.OAA08244@khavrinen.lcs.mit.edu> To: jpasski@kpmg.com Cc: ports@freebsd.org, stable@freebsd.org Subject: Re: pkg_version X-Newsgroups: mit.lcs.mail.freebsd-stable In-Reply-To: Organization: MIT Laboratory for Computer Science Cc: Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >When trying to upgrade complex applications like XFree86 w/ Enlightenment & >Gnome, is there a sequence that should be followed on what applications are >updated first to last? Here is a short shell script (can even be entered interactively if you are using a Real Shell[tm]) which will tell you in which order the stuff you currently needs to be built. Reverse the list to find the order in which they should be removed. ------------------------------------ #!/bin/sh cd /var/db/pkg for a in *; do if [ -r ${a}/+REQUIRED_BY ]; then while read pkg; do echo ${a} ${pkg} done <${a}/+REQUIRED_BY fi done | tsort ------------------------------------ If you see the error `tsort: cycle in data', then something is seriously broken. (It is conceivable that such cycles could be formed.) Note that the topological sort is not a full sort, so not all of the ordering is meaningful, and this doesn't take build-dependencies into account -- only run dependencies. This information could be extracted from the INDEX file by pkg_version. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message