Re: freebsd-update's install_verify routine excessive stating

2009-01-26 Thread Oliver Fromme
Doug Barton wrote: > Oliver Fromme wrote: > > However, I think cmp wouldn't work here, because cmp only > > detects whether there is a difference between two files. > > > > In this case we need to know if one file is a subset of > > the other: For every hash there must be a .gz file, but

Re: freebsd-update's install_verify routine excessive stating

2009-01-24 Thread Doug Barton
Oliver Fromme wrote: > Doug Barton wrote: > > Oliver Fromme wrote: > > > I assume, with "this" you mean my solution to the slow > > > shell loop problem (not quoted above), not Yoshihiro Ota's > > > awk proposal? > > > > I meant the solution using comm, sorry. (I forgot to mention that I >

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Yoshihiro Ota
Oliver, You are making a good point but connecting two different subjects. The algorithm with awk is still the fastest in theory. It uses a hash table which runs at O(c) for each comparison ASSUMING you have a good hash function that yields such result. The total number of comparison is O(n) or O

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Oliver Fromme
Doug Barton wrote: > Oliver Fromme wrote: > > I assume, with "this" you mean my solution to the slow > > shell loop problem (not quoted above), not Yoshihiro Ota's > > awk proposal? > > I meant the solution using comm, sorry. (I forgot to mention that I > would probably use cmp here, but t

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Doug Barton
Oliver Fromme wrote: > I assume, with "this" you mean my solution to the slow > shell loop problem (not quoted above), not Yoshihiro Ota's > awk proposal? I meant the solution using comm, sorry. (I forgot to mention that I would probably use cmp here, but that's a personal preference.) > Yes, it

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Oliver Fromme
Doug Barton wrote: > Oliver Fromme wrote: > > Yoshihiro Ota wrote: > > > Oliver Fromme wrote: > > > > It would be much better to generate two lists: > > > > - The list of hashes, as already done ("filelist") > > > > - A list of gzipped files present, stripped to the hash: > > > > > > >

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Doug Barton
Oliver Fromme wrote: > Yoshihiro Ota wrote: > > Oliver Fromme wrote: > > > It would be much better to generate two lists: > > > - The list of hashes, as already done ("filelist") > > > - A list of gzipped files present, stripped to the hash: > > > > > >(cd files; echo *.gz) | > > >

Re: freebsd-update's install_verify routine excessive stating

2009-01-23 Thread Oliver Fromme
Yoshihiro Ota wrote: > Oliver Fromme wrote: > > It would be much better to generate two lists: > > - The list of hashes, as already done ("filelist") > > - A list of gzipped files present, stripped to the hash: > > > >(cd files; echo *.gz) | > >tr ' ' '\n' | > >sed 's/\.gz$/

Re: freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Yoshihiro Ota
Hi. It's interesting. On Thu, 22 Jan 2009 13:17:41 +0100 (CET) Oliver Fromme wrote: > Hi, > > > So I would suggest to replace the whole pipe with this: > >awk -F "|" '$2 ~ /^f/ {print $2}' "$@" | >sort -u > filelist > > It would be much better to generate two lists: > - The list o

Re: freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Dag-Erling Smørgrav
Bert JW Regeer writes: > [problems with freebsd-update] You should probably send a copy of this to cperc...@... DES -- Dag-Erling Smørgrav - d...@des.no ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hac

Re: freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Oliver Fromme
Christoph Mallon wrote: > Oliver Fromme schrieb: > > > cut -f 2,7 -d '|' | > > > grep -E '^f' | > > > cut -f 2 -d '|' | > > > sort -u > filelist > > > > It's unclear why there are two "cut" commands. The 7th > > field isn't used at all.

Re: freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Christoph Mallon
Oliver Fromme schrieb: > cut -f 2,7 -d '|' | > grep -E '^f' | > cut -f 2 -d '|' | > sort -u > filelist It's unclear why there are two "cut" commands. The 7th field isn't used at all. Also, the -E option to grep After the first cut the s

Re: freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Oliver Fromme
Hi, I've Cc'ed Colin Percival, the author of freebsd-update. Bert JW Regeer wrote: > Recently I decided it would be time to upgrade an older laptop that > was still running 6.2-RELEASE to a more recent release 7.1-RELEASE > [...] > Everything went well, including the kernel update. It was n

freebsd-update's install_verify routine excessive stating

2009-01-22 Thread Bert JW Regeer
Hackers, Recently I decided it would be time to upgrade an older laptop that was still running 6.2-RELEASE to a more recent release 7.1-RELEASE (re- install not possible, laptop has no cd-rom drive, and does not boot from a USB one). Everything went well, including the kernel update. It wa