<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
seth vidal wrote:
<blockquote cite="mid1174998403.30355.43.camel@cutter" type="cite">
  <pre wrap="">On Tue, 2007-03-27 at 13:29 +0300, Jonathan Dieter wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On Tue, 2007-03-27 at 12:05 +0200, Michael Schroeder wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">On Mon, Mar 26, 2007 at 04:34:21PM -0400, seth vidal wrote:
      </pre>
      <blockquote type="cite">
        <pre wrap="">1. why are you using md5sum and not sha1sums?
        </pre>
      </blockquote>
      <pre wrap="">It checks if the md5sum of the file matches the sum from the rpm
header.

It works basically like this: The "sequence" tells applydeltarpm
which of the files from the rpm header were used to create the
deltarpm and the order of those files (thus the name "sequence"
in case you wondered). makedeltarpm doesn't use all files to
create the delta, config files and files that have the "verify"
bit off get excluded. If you ask applydeltarpm to check if a
deltarpm can be applied it uses this sequence to verify that all
used files are unchanged, either by just checking the size (the
fast method) or by checking the md5sum (like rpm does).
The fast method makes sense if the updater has a fallback to
fetch the complete rpm if applydeltarpm failes, as in most cases
files are unchanged if the size is the same.

Cheers,
  Michael.

      </pre>
    </blockquote>
    <pre wrap="">And I changed Presto last night to use the full method, rather than the
fast method.  Our fallback method is pretty lousy (exiting with an
error, working the second time yum is called), at least for the moment.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
Why is that? I need to take a look at the code but there doesn't seem to
be any reason why it shouldn't be able to fall back to downloading the
whole package. It knows where it is.

-sv

  </pre>
</blockquote>
I look at the code, it works in the following way: <br>
<br>
postresolve_hook(conduit):<br>
    for each po to be install in TransactionSet:<br>
        check if delta as available.<br>
        make the po point to the delta insted of the full rpm.<br>
<br>
normal yum downloading (yum.downloadPkg)<br>
<br>
postdownload_hook(conduit):<br>
    for each pkg in the downloadpackages:<br>
          if pkg is a delta:<br>
             try:<br>
                   build the full rpm from the delta<br>
             except:<br>
                   Something is rotten in the state of Denmark, bail
out.<br>
<br>
if could be changed to:<br>
predownload_hook(conduit,pkglist):<br>
    for each po in pkglist:<br>
        if as delta is available:<br>
            try:  <br>
                download the delta (copy the download code from
yum.downloadPkgs)   <br>
                build the full rpm.<br>
                set po.pkgtype = 'local' # To make yum skip it in the
normal download.<br>
             except:<br>
                Something is rotten in the state of Denmark, just leave
the po unchanged an yum will handle the download as normal.<br>
<br>
normal yum downloading (yum.downloadPkg)<br>
   will download all the packages not processed without error, by the
predownload_hook.<br>
<br>
Tim<br>
<br>
<br>
<br>
</body>
</html>