Discussion:
xdelta3 - how to apply a patch file?
(too old to reply)
s***@googlemail.com
2007-07-27 17:54:48 UTC
Permalink
I find xdelta3 baffaling. This tool is meant to be able to create and
then apply a binary patch.

nowhere does it say how to do this, observe the help options (below) -
just endless wibble about compression, decompression and
recompression...

Does anyone know the syntax for getting xdelta3 to apply a patch ??


./xdelta3 --

VERSION=3.0q
usage: xdelta3 [command/options] [input [output]]
special command names:
config prints xdelta3 configuration
decode decompress the input
encode compress the input
test run the builtin tests
special commands for VCDIFF inputs:
printdelta print information about the entire delta
printhdr print information about the first window
printhdrs print information about all windows
standard options:
-0 .. -9 compression level
-c use stdout
-d decompress
-e compress
-f force overwrite
-h show help
-q be quiet
-v be verbose (max 2)
-V show version
memory options:
-B bytes source window size
-W bytes input window size
-P size compression duplicates window
-I size instruction buffer size (0 = unlimited)
compression options:
-s source source file to copy from (if any)
-S [djw|fgk] enable/disable secondary compression
-N disable small string-matching compression
-D disable external decompression (encode/decode)
-R disable external recompression (decode)
-n disable checksum (encode/decode)
-C soft config (encode, undocumented)
-A [apphead] disable/provide application header (encode)
the XDELTA environment variable may contain extra args:
XDELTA="-s source-x.y.tar.gz" \
tar --use-compress-program=xdelta3 \
-cf target-x.z.tar.gz.vcdiff target-x.y/
f***@gmail.com
2007-07-28 14:57:24 UTC
Permalink
Post by s***@googlemail.com
I find xdelta3 baffaling. This tool is meant to be able to create and
then apply a binary patch.
[...]
Does anyone know the syntax for getting xdelta3 to apply a patch ??
yes; any more questions? ;)

and to prove, that there's someone, who figured out the syntax:

apply patch: xdelta3 -d patch
or apply patch: xdelta3 -d -s original.foo modified.bar
create patch: xdelta3 -s original modified > patch

"original", "modified" and "patch" are file names;
patch contains two file names (original and modified)
and the compressed changeset,

that's why the first patch-apply example works;
the secont patch-apply example shows how to apply a patch with,
if you have the original file under a different name
and if you wan't your patched file to have a different name
fogfox
2007-07-29 01:18:20 UTC
Permalink
Post by f***@gmail.com
Post by s***@googlemail.com
I find xdelta3 baffaling. This tool is meant to be able to create and
then apply a binary patch.
[...]
Does anyone know the syntax for getting xdelta3 to apply a patch ??
yes; any more questions? ;)
apply patch: xdelta3 -d patch
or apply patch: xdelta3 -d -s original.foo modified.bar
create patch: xdelta3 -s original modified > patch
"original", "modified" and "patch" are file names;
patch contains two file names (original and modified)
and the compressed changeset,
that's why the first patch-apply example works;
the secont patch-apply example shows how to apply a patch with,
if you have the original file under a different name
and if you wan't your patched file to have a different name
edit:
"or apply patch: xdelta3 -d -s original.foo modified.bar" should read:
"or apply patch: xdelta3 -d -s original.foo patch modified.bar"

I'll chime in again if I find another mistake on my part;
this was fogfox;
thinking so you don't have to ;)
have a nice one

Continue reading on narkive:
Loading...