<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The debdelta suite</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="article"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
><A
NAME="AEN2"
>The debdelta suite</A
></H1
><H3
CLASS="author"
><A
NAME="AEN4"
>Andrea C. G. Mennucci</A
></H3
><P
CLASS="copyright"
>Copyright &copy; 2006-2011 </P
><DIV
><DIV
CLASS="abstract"
><P
></P
><A
NAME="AEN8"
></A
><P
>debdelta is an application suite designed to compute
 changes between Debian packages. These changes (that we will call
 'deltas') are similar to the output of the "diff" program in that
 they may be used to store and transmit only the changes between
 Debian packages.  This suite contains 'debdelta-upgrade', that
 downloads deltas and use them to create all Debian packages needed
 for an 'apt-get upgrade'.  </P
><P
></P
></DIV
></DIV
><HR></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>1. <A
HREF="#AEN13"
>Overview</A
></DT
><DD
><DL
><DT
>1.1. <A
HREF="#AEN16"
>debdelta</A
></DT
><DT
>1.2. <A
HREF="#AEN20"
>debpatch</A
></DT
><DT
>1.3. <A
HREF="#AEN24"
>debdeltas</A
></DT
><DT
>1.4. <A
HREF="#AEN27"
>debdelta-upgrade</A
></DT
></DL
></DD
><DT
>2. <A
HREF="#AEN31"
>Todo</A
></DT
></DL
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="AEN13"
>1. Overview</A
></H2
><P
>&#13;      The debdelta application suite is really composed of different applications.</P
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN16"
>1.1. debdelta</A
></H3
><P
>&#13;'debdelta'  computes the delta, that is, a file that encodes the difference
between two Debian packages.

Example:
<PRE
CLASS="programlisting"
>&#13;$ a=/var/cache/apt/archives 
$ debdelta -v $a/emacs-snapshot-common_1%3a20060512-1_all.deb \
  $a/emacs-snapshot-common_1%3a20060518-1_all.deb /tmp/emacs.debdelta
</PRE
>
the result is:
 deb delta is  12.5% of deb ; that is, 15452kB would be saved
 </P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN20"
>1.2. debpatch</A
></H3
><P
>&#13;'debpatch' can use the delta file and a copy of the old Debian package
to recreate the new Debian package.  (This process is called "applying
the delta file"). If the old Debian package is not available, but is
installed in the host, it can use the installed data; in this case,
'/' is used in lieu of the old .deb.

Example:
<PRE
CLASS="programlisting"
>&#13;$ debpatch -A  /tmp/emacs.debdelta / /tmp/emacs.deb
</PRE
>
</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN24"
>1.3. debdeltas</A
></H3
><P
>&#13;'debdeltas' can be used to generate deltas for many debs at once.
It will generate delta files with names such as
 package_old-version_new-version_architecture.debdelta
and put them in the directory where the new .deb is.

If the delta exceeds ~70% of the deb, 'debdeltas' will delete it
and leave a stamp of the form
 package_old-version_new-version_architecture.debdelta-too-big

Example usages are in the man page; see also
the scripts /usr/share/debdelta/debmirror-delta-security
and  /usr/share/debdelta/debmirror-deltas
</P
></DIV
><DIV
CLASS="section"
><HR><H3
CLASS="section"
><A
NAME="AEN27"
>1.4. debdelta-upgrade</A
></H3
><P
>&#13;
This command will download necessary deltas
and apply them to create debs for an 'apt-get upgrade' .

The deltas are available for upgrades in
 'stable' , 'stable-security' , 'testing', 'unstable' and 'experimental',
 for i386 and amd64.

Example usage:
<PRE
CLASS="programlisting"
>&#13;# apt-get update &#38;&#38; debdelta-upgrade &#38;&#38; apt-get upgrade
</PRE
>
If run by a non-root user, debs are saved in /tmp/archives : do not
 forget to move them in /var/cache/apt/archives

debdelta-upgrade will also download .debs for which no delta is
available (this is done in parallel to patching, to maximize
speed). See the explanation of "debdelta-upgrade --deb-policy" in the
man page for more info and customization on which debs get downloaded.

More info are in README.upgrade


    </P
></DIV
></DIV
><DIV
CLASS="section"
><HR><H2
CLASS="section"
><A
NAME="AEN31"
>2. Todo</A
></H2
><P
></P
><OL
TYPE="1"
><LI
><P
>&#13;Prepare an APT method so that 
'apt-get upgrade' would actually use deltas.
Some code is already written.
</P
></LI
><LI
><P
>&#13;It would be nice if debdelta-upgrade would actually choose if
<P
></P
><UL
><LI
><P
>&#13;download a delta and use it to create the .deb
</P
></LI
><LI
><P
>download the deb
depending on which one would be faster.
</P
></LI
></UL
>
Unfortunately, this decision must depend on a good model
to predict the speed of patching... and this I still cannot
achieve.
</P
></LI
></OL
></DIV
></DIV
></BODY
></HTML
>
