> They might not be as haphazard as you suggest. ISTR once reading that
> the CDs were arranged with the most popular packages on the first CD so
> that you would only need to download disk 2 (and 3) if you wanted some
> of the less common packages. With your suggested layout it's quite
> likely that a package which most of the others depend on would be right
> down at the bottom of the list with the result that you'd invariably
> need to download all 3 CD images.

I have to admit that I have no idea how they are organized, there could be
very good reasons for doing it the current way.  However, I was actually
only suggesting that the packages be sorted by "popularity", where
"popularity" is the number of packages which depend on the package in
question (this would need to include both direct and indirect
dependencies).  The most-depended-upon packages would go on the first disc
and the least-depended-upon packages would go on the last.  If you move from
first to last, then all dependencies are automatically satisfied.

While this should put most of the common packages on the first disc, you
could have a frequently installed package that was not highly depended upon
that was placed on the last disc.  If your aim was to minimize the number of
discs that had to be downloaded this ordering would be less that ideal.
However, there are a large number of orderings which still satisfy the
dependencies; the one I gave is just a good starting point.  If you wanted,
such packages could be "promoted" in the ordering by placing them
immediately after all of their dependencies had been satisfied.  In fact,
you could do this recursively for every package that the particular package
depended upon so that it occurred as early in the ordering as possible.  And
if you had a list of such "important" packages this could clearly be
performed for each (if you started with the least important and moved to the
most, you could ensure that the most important were placed earlier in the

I think the best way to avoid the need for frequent CD switching would
> be for sysinstall to sort the list of selected packages into CD order
> before installing them. I imagine this would require some changes to
> pkg_add to prevent it from installing dependencies and I expect the
> possible benefits would not be considered to be sufficient to justify
> the effort.

I agree that fiddling with pkg_add to place the packages neatly on the disc
would probably not be worth the effort, but I'm not sure that it is
necessary.  In order for the method I suggested to work, sysinstall would
have to be modified to attempt installation in the selected ordering.  If
you had a list of the packages in this ordering, you would only have to flip
the "please install this one" bit for the selected packages, and then
traverse the list in order installing/ignoring each package.  Since all
dependencies would be satisfied by virtue of the ordering, pkg_add would
find that every dependency had already been satisfied and should not cause
any problems.
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to