Date: Tue, 28 Nov 2000 14:38:05 -0500 (EST) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: jpasski@kpmg.com Subject: Re: pkg_version Message-ID: <200011281938.OAA08244@khavrinen.lcs.mit.edu> In-Reply-To: <mit.lcs.mail.freebsd-stable/7799D023E51ED311BFB50008C75DD7B402881AD7@uschiexc05.kweb.us.kpmg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <mit.lcs.mail.freebsd-stable/7799D023E51ED311BFB50008C75DD7B402881AD7@uschiexc05.kweb.us.kpmg.com> 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-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011281938.OAA08244>