[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: jigdo-file: Does not report package rejections because checksum mismatch



Hi,

I wrote:
> > > >                   sed -e 's/^[hH][tT][tT][pP]:\/\///' \
> > > >                        ... more -e for https, ftp, and file ...

Philip Hands wrote:
> > >   sed -e 's,^\(https\?\|ftp\|file\)://,,i'
> > > ...
> > >  "$imageTmp/${url#[[:alpha:]]*://}"

> > Are these widely portable enough ?

> [Philip Hands analyzed portability with positive result]

I still think that the long explicit sed is clearer. But in the end it will
be up to Steve to decide which one to use.
I tested both proposals of yours and have put them as comments into my
evolving changeset.

The importance of this expression has decreased by my decision to run "find"
if the guessed local path does not lead to an existing file:

    localPath=... guessed from URL ...

    if test ! -e "$localPath"
    then
      # Maybe above guess was wrong
      baseName=`basename "$url"`
      localPath=`find "$imageTmp" -name "$baseName" | head -1`
    fi

    if test -n "$localPath" -a -e "$localPath"
    then
       ... checksum verification ...

The use of "head" and "find" will be new in the script. But the increased
ruggedness makes it worthwhile in my opinion.

I made mini benchmarks with guessed names and found names. No significant
differences were to see.
(The tree is really small because fetchAndMerge() deletes it when the 10
 files are processed.)

The effective throughput of roughly 1.5 to 2.5 MB/s is still much slower
than wget's speed report of about 5.5 MB/s.
I tried with 100 files per run of wget and "jigdo-file make-image".
No significant difference to see. It's all about mirror server latency
with each single file, i guess.
us.cdimage.debian.org is a quick one.


I wrote:
> > > > fileMD5=`$jigdoFile md5 "$localPath" 2>/dev/null | awk '{print $1}'`

Philip Hands wrote:
> `$jigdoFile md5sum --report=quiet "$localPath" | sed 's/ .*$//'`

I'll take this one.


Next development step will be to issue a correct "Aaargh" message and to
tell at least some of the mismatching files in that message.


Have a nice day :)

Thomas


Reply to: