index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2009-05-22 00:24:26 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-06-06 11:16:45 -0500 |
commit | 13b281d74380d9622574bd546e7f9084054ae289 (patch) | |
tree | 1c424f074e39be3a5e159d102ed8080dfa9e89e8 /lib/libalpm | |
parent | 9af9c0f328094228fa363d842ddc9b2a605f0d22 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 11 |
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index abda1472..35e6fca4 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -622,15 +622,12 @@ static int apply_deltas(pmtrans_t *trans) snprintf(to, len, "%s/%s", cachedir, d->to); /* build the patch command */ - /* compression command */ - char *compress = "cat"; if(endswith(to, ".gz")) { - compress = "gzip -n"; - } else if(endswith(to, ".bz2")) { - compress = "bzip"; + /* special handling for gzip : we disable timestamp with -n option */ + snprintf(command, PATH_MAX, "xdelta3 -d -q -R -c -s %s %s | gzip -n > %s", from, delta, to); + } else { + snprintf(command, PATH_MAX, "xdelta3 -d -q -s %s %s %s", from, delta, to); } - /* -R for disabling external recompression, -c for sending to stdout */ - snprintf(command, PATH_MAX, "xdelta3 -d -q -R -c -s %s %s | %s > %s", from, delta, compress, to); _alpm_log(PM_LOG_DEBUG, "command: %s\n", command); |