Re: many packages not available



Rudolf Polzer <usenet@xxxxxxxxxxxxxxxx> wrote:


Actually I am thinking of doing that as a shell script.

But I do know this approach will have some obvious bugs. I will try
ordering by dependencies, but until now I don't know how to get an index
of the packages on some mirror that contains dependency information.

Do ftp to an ftp server and run ls under All. You have the list of all
available packages, period. The second point is to parse the version number
which is non trivial. Dependency information you can get by downloading the
INDEX file if it is up to date. One of the problems is dependencies having
moved, hopefully mentioned in the MOVED files. As you can see all this
requires a lot of parsing and programming. I don't think and even i am quite
sure that shell is not adapted. The guy having done the work for OpenBSD
has done it in perl. He said me that his perl scripts are faster than the old
C programs by J. Hubbard. Of course you need to be good at perl for doing
that. A slightly slower but easier solution is python. At present i have done
the exercise of writing a python script to build the INDEX, which means a lot
of the basic routines necessary to do the job are already done.


Plus, I probably can't guarantee consistency of the dependencies while
it is running, so a crash in the middle of such a run could cause
packages without installed prerequisites. But it looks like portupgrade
has the very same issue - if a library is just being upgraded, packages
depending on it are not guaranteed to work (and they won't between the
deinstall and the reinstall portupgrade executes).

Sure, this is THE big problem of the FreeBSD ports system, using source
and not binaries you cannot guarantee that the problem you mention will not
occur, and even more, if you have sufficiently complex software installed,
like gnome, you have a high probability of its occurence.



Still, I hope I will get it "good enough" for non mission critical
systems (like my 800 MHz notebook, which I just don't want to let run
for multiple days just to update KDE).

In my experience, KDE has always updated very well with binaries. The
problem of doing that with portupgrade is that it is dog slow. You will be ten
times faster removing all KDE stuff plus dependencies and reinstalling with
binaries.




--

Michel TALON

.



Relevant Pages