From: Eric Biggers Date: Fri, 13 Jan 2017 04:04:18 +0000 (-0800) Subject: wimappend: support --delta-from option X-Git-Tag: v1.11.0~7 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=533c97bba23794f9bd014626dd1ba2477c628919 wimappend: support --delta-from option --delta-from was previously only supported by wimcapture. But it is trivial to make wimappend support it too, and it could be useful. --- diff --git a/NEWS b/NEWS index 14e9675e..d519010a 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ Version 1.11.0-BETA5: and applies extended attributes, in addition to the already-supported standard UNIX file permissions (owner/group/mode) and special files. + --delta-from is now supported by wimappend. (Previously it was only + supported by wimcapture.) + On Windows, improved the way in which files deduplicated with Windows' Data Deduplication feature are captured. diff --git a/doc/man1/wimcapture.1 b/doc/man1/wimcapture.1 index 1615ea7f..bbf89a1c 100644 --- a/doc/man1/wimcapture.1 +++ b/doc/man1/wimcapture.1 @@ -473,10 +473,10 @@ performance and does not change the resulting WIM image (but see note below). .IP "" As shown, the full syntax for the argument to this option is to specify the WIM file, a colon, and the image; for example, "--update-of mywim.wim:1". However, -the WIM file and colon may be omitted, in which case the WIM file will default -to the WIM file being appended to for append operations, or the WIM file from -which a delta is being taken (only if \fB--delta-from\fR is specified exactly -once) for capture operations. +the WIM file and colon may be omitted if \fB--delta-from\fR is specified exactly +once, in which case the WIM defaults to that specified in \fB--delta-from\fR, or +if the operation is \fBwimappend\fR rather \fBwimcapture\fR, in which case the +WIM defaults to the one being appended to. .IP "" Note: in the Windows version of wimlib, it has been observed that \fB--update-of\fR mode is not completely reliable at detecting changes in file @@ -494,11 +494,11 @@ other operating systems such as Linux which maintain files' last modification timestamps correctly. .TP \fB--delta-from\fR=\fIWIMFILE\fR -With \fBwimcapture\fR, capture the new WIM as a "delta" from \fIWIMFILE\fR. Any -file data that would ordinarily need to be archived in the new WIM is omitted if -it is already present in the \fIWIMFILE\fR on which the delta is being based. -The new WIM will still contain a full copy of the image metadata, but this is -typically only a small fraction of a WIM's total size. +Capture or append the new image as a "delta" from \fIWIMFILE\fR. Any file data +that would ordinarily need to be archived in the new or updated WIM is omitted +if it is already present in the \fIWIMFILE\fR on which the delta is being based. +The resulting WIM will still contain a full copy of the image metadata, but this +is typically only a small fraction of a WIM's total size. .IP "" This option can be specified multiple times, in which case the resulting delta WIM will only contain file data not present in any of the specified base WIMs. @@ -537,6 +537,8 @@ WIM, the second backup could have simply been appended to the WIM as new image using \fBwimappend\fR. Delta WIMs should be used only if it's desired to base the backups or images on a separate, large file that is rarely modified. .IP "" +\fB--delta-from\fR is supported by both \fBwimcapture\fR and \fBwimappend\fR. +.IP "" Delta WIMs are compatible with Microsoft's WIM software. For example, you can use the /ref option of ImageX to reference the base WIM(s), similar to above. .IP "" diff --git a/programs/imagex.c b/programs/imagex.c index 8f2aa0ef..e62757b8 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -1986,11 +1986,6 @@ imagex_capture_or_append(int argc, tchar **argv, int cmd) } break; case IMAGEX_DELTA_FROM_OPTION: - if (cmd != CMD_CAPTURE) { - imagex_error(T("'--delta-from' is only " - "valid for capture!")); - goto out_usage; - } ret = string_list_append(&base_wimfiles, optarg); if (ret) goto out; @@ -4385,7 +4380,8 @@ T( " [--boot] [--check] [--nocheck] [--config=FILE]\n" " [--threads=NUM_THREADS] [--no-acls] [--strict-acls]\n" " [--rpfix] [--norpfix] [--update-of=[WIMFILE:]IMAGE]\n" -" [--wimboot] [--unix-data] [--dereference] [--snapshot]\n" +" [--delta-from=WIMFILE] [--wimboot] [--unix-data]\n" +" [--dereference] [--snapshot]\n" ), [CMD_APPLY] = T(