Bug fix: -not_leaf and -not_paths were not applied to -extract and alike

This commit is contained in:
2021-09-13 17:12:34 +02:00
parent 358262818e
commit b5a33c3418
6 changed files with 227 additions and 125 deletions

View File

@ -1332,12 +1332,13 @@ File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Commands
-not_mgt code[:code[...]]
Control the behavior of the exclusion lists.
Exclusion processing happens before disk_paths get mapped to the
ISO image and before disk files get compared with image files. The
absolute disk path of the source is matched against the -not_paths
list. The leafname of the disk path is matched against the
patterns in the -not_leaf list. If a match is detected then the
disk path will not be regarded as an existing file and not be added
to the ISO image.
ISO image, before disk files get compared with image files, and
before image files get extracted to disk files.
The absolute disk paths involved in such an action are matched
against the -not_paths list. The leafnames of disk paths are
matched against the patterns in the -not_leaf list. If a match is
detected then the disk path will not be regarded as an existing
file and not be added to the ISO image.
Several codes are defined. The _on/_off settings persist until
they are revoked by their_off/_on counterparts.
"erase" empties the lists which were accumulated by -not_paths and
@ -1365,6 +1366,13 @@ File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Commands
If a given path is relative, then the current -cdx is prepended to
form an absolute path. Pattern matching, if enabled, happens at
definition time and not when exclusion checks are made.
Keep in mind that there may be alternative paths to the same disk
file. The exclusion tests are done literally, so that they do not
keep files from getting into the ISO filesystem by other paths.
Accordingly an exclusion does not prevent a disk file from being
overwritten by file extraction via an alternative not excluded
path. So the exlusions need to be coordinated with the actual
disk_path parameters given with commands.
(Do not forget to end the list of disk_paths by "--")
-not_leaf pattern
Add a single shell parser style pattern to the list of exclusions
@ -4201,10 +4209,17 @@ Normally 'xorriso' only writes to disk files which were given as stdio:
pseudo-drives or as log files. But its alter ego osirrox is able to
extract file objects from ISO images and to create, overwrite, or delete
file objects on disk.
Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply. If disk
file objects already exist then the settings of -overwrite and -reassure
apply. But -overwrite "on" only triggers the behavior of -overwrite
"nondir". I.e. directories cannot be deleted.
Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply. The
exclusion tests are made with the paths and names for the disk files.
If exclusion of paths or names in the ISO image is desired, then use
image manipulation commands like -rm or -find ... -exec rm before
extraction, and end the program by -rollback_end .
Excluded disk_path parameters of extraction commands cause SORRY events.
Implicitely given paths in trees under disk_path parameters are excluded
silently.
If disk file objects already exist then the settings of -overwrite and
-reassure apply. But -overwrite "on" only triggers the behavior of
-overwrite "nondir". I.e. directories cannot be deleted.
Access permissions of files in the ISO image do not restrict restoring.
The directory permissions on disk have to allow rwx.
@ -5599,14 +5614,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -compare_l reports ISO/disk differences: Navigate. (line 147)
* -compare_r reports ISO/disk differences: Navigate. (line 143)
* -compliance controls standard compliance: SetWrite. (line 62)
* -concat copies ISO file content: Restore. (line 139)
* -concat copies ISO file content: Restore. (line 146)
* -copyright_file sets copyright file name: SetWrite. (line 245)
* -cpax copies files to disk: Restore. (line 121)
* -cpax copies files to disk: Restore. (line 128)
* -cpr inserts like with cp -r: Insert. (line 164)
* -cpx copies files to disk: Restore. (line 110)
* -cpx copies files to disk: Restore. (line 117)
* -cp_clone copies ISO directory tree: Insert. (line 196)
* -cp_rx copies file trees to disk: Restore. (line 124)
* -cp_rx copies file trees to disk <1>: Restore. (line 132)
* -cp_rx copies file trees to disk: Restore. (line 131)
* -cp_rx copies file trees to disk <1>: Restore. (line 139)
* -cut_out inserts piece of data file: Insert. (line 139)
* -data_cache_size adjusts read cache size: Loading. (line 362)
* -dev acquires one drive for input and output: AqDrive. (line 12)
@ -5633,17 +5648,17 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -error_behavior controls error workarounds: Exception. (line 92)
* -external_filter registers data filter: Filter. (line 20)
* -external_filter unregisters data filter: Filter. (line 47)
* -extract copies file tree to disk: Restore. (line 83)
* -extract copies file tree to disk: Restore. (line 90)
* -extract_boot_images copies boot equipment to disk: Restore.
(line 167)
* -extract_cut copies file piece to disk: Restore. (line 101)
* -extract_l copies files to disk: Restore. (line 97)
* -extract_single copies file to disk: Restore. (line 94)
(line 174)
* -extract_cut copies file piece to disk: Restore. (line 108)
* -extract_l copies files to disk: Restore. (line 104)
* -extract_single copies file to disk: Restore. (line 101)
* -file_name_limit curbs length of file names: Loading. (line 276)
* -file_size_limit limits data file size: SetInsert. (line 7)
* -find traverses and alters ISO tree: CmdFind. (line 7)
* -findx traverses disk tree: Navigate. (line 91)
* -follow softlinks and mount points: SetInsert. (line 69)
* -follow softlinks and mount points: SetInsert. (line 77)
* -format formats media: Writing. (line 87)
* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 215)
* -fs sets size of fifo: SetWrite. (line 479)
@ -5693,28 +5708,28 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -md5 controls handling of MD5 sums: Loading. (line 184)
* -mkdir creates ISO directory: Insert. (line 177)
* -modesty_on_drive keep drive buffer hungry: SetWrite. (line 419)
* -mount issues mount command for ISO session: Restore. (line 195)
* -mount issues mount command for ISO session: Restore. (line 202)
* -mount_cmd composes mount command line: Inquiry. (line 49)
* -mount_cmd controls mount command: Inquiry. (line 65)
* -msg_op perform operations on program messages: Frontend. (line 27)
* -mv renames files in ISO image: Manip. (line 37)
* -mv renames single file in ISO image: Manip. (line 31)
* -named_pipe_loop enters EOF resistant dialog: Frontend. (line 119)
* -not_leaf sets exclusion pattern: SetInsert. (line 59)
* -not_list sets exclusions from disk file: SetInsert. (line 63)
* -not_leaf sets exclusion pattern: SetInsert. (line 67)
* -not_list sets exclusions from disk file: SetInsert. (line 71)
* -not_mgt controls file exclusion: SetInsert. (line 22)
* -not_paths sets absolute exclusion paths: SetInsert. (line 53)
* -not_paths sets absolute exclusion paths: SetInsert. (line 54)
* -no_rc disables startup files: Scripting. (line 7)
* -options_from_file reads commands from file: Scripting. (line 12)
* -osirrox enables ISO-to-disk copying: Restore. (line 18)
* -osirrox enables ISO-to-disk copying: Restore. (line 25)
* -outdev acquires a drive for output: AqDrive. (line 29)
* -out_charset sets output character set: SetWrite. (line 285)
* -overwrite enables overwriting in ISO: SetInsert. (line 131)
* -overwrite enables overwriting in ISO: SetInsert. (line 139)
* -pacifier controls pacifier text form: Emulation. (line 166)
* -padding sets amount or mode of image padding: SetWrite. (line 507)
* -page set terminal geometry: DialogCtl. (line 18)
* -paste_in copies file into disk file: Restore. (line 135)
* -pathspecs sets meaning of = with -add: SetInsert. (line 115)
* -paste_in copies file into disk file: Restore. (line 142)
* -pathspecs sets meaning of = with -add: SetInsert. (line 123)
* -path_list inserts paths from disk file: Insert. (line 81)
* -pkt_output consolidates text output: Frontend. (line 7)
* -preparer_id sets preparer id: SetWrite. (line 261)
@ -5729,7 +5744,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -pvd_info shows image id strings: Inquiry. (line 108)
* -pwd tells working directory in ISO: Navigate. (line 19)
* -pwdx tells working directory on disk: Navigate. (line 21)
* -quoted_not_list sets exclusions: SetInsert. (line 66)
* -quoted_not_list sets exclusions: SetInsert. (line 74)
* -quoted_path_list inserts paths from disk file: Insert. (line 85)
* -read_fs filesystem type for image loading: Loading. (line 96)
* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation.
@ -5770,7 +5785,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
(line 66)
* -sleep waits for a given time span: Scripting. (line 113)
* -speed set write speed: SetWrite. (line 371)
* -split_size enables large file splitting: SetInsert. (line 145)
* -split_size enables large file splitting: SetInsert. (line 153)
* -status shows current settings: Scripting. (line 44)
* -status_history_max curbs -status history: Scripting. (line 52)
* -stdio_sync controls stdio buffer: SetWrite. (line 469)
@ -5886,7 +5901,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Emulation, pacifier form, -pacifier: Emulation. (line 166)
* Examples: Examples. (line 6)
* extattr, _definition: Extras. (line 66)
* File content, copy, -concat: Restore. (line 139)
* File content, copy, -concat: Restore. (line 146)
* File names, curb length, -file_name_limit: Loading. (line 276)
* File names, if Joliet is loaded: Loading. (line 242)
* File names, if neither Rock Ridge nor Joliet: Loading. (line 229)
@ -5936,21 +5951,21 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Image, show MBR, GPT, and alike, -pvd_info: Inquiry. (line 138)
* Image, _definition: Model. (line 9)
* Input Character Set, _definition: Charset. (line 25)
* Insert, enable overwriting, -overwrite: SetInsert. (line 131)
* Insert, file exclusion absolute, -not_paths: SetInsert. (line 53)
* Insert, file exclusion from file, -not_list: SetInsert. (line 63)
* Insert, file exclusion pattern, -not_leaf: SetInsert. (line 59)
* Insert, enable overwriting, -overwrite: SetInsert. (line 139)
* Insert, file exclusion absolute, -not_paths: SetInsert. (line 54)
* Insert, file exclusion from file, -not_list: SetInsert. (line 71)
* Insert, file exclusion pattern, -not_leaf: SetInsert. (line 67)
* Insert, file exclusion, -not_mgt: SetInsert. (line 22)
* Insert, file exclusion, -quoted_not_list: SetInsert. (line 66)
* Insert, file exclusion, -quoted_not_list: SetInsert. (line 74)
* Insert, if different, -update: Insert. (line 100)
* Insert, if different, -update_l: Insert. (line 120)
* Insert, if different, -update_li: Insert. (line 124)
* Insert, if different, -update_lxi: Insert. (line 128)
* Insert, if different, -update_r: Insert. (line 110)
* Insert, large file splitting, -split_size: SetInsert. (line 145)
* Insert, large file splitting, -split_size: SetInsert. (line 153)
* Insert, limit data file size, -file_size_limit: SetInsert. (line 7)
* Insert, links or mount points, -follow: SetInsert. (line 69)
* Insert, meaning of = with -add, -pathspecs: SetInsert. (line 115)
* Insert, links or mount points, -follow: SetInsert. (line 77)
* Insert, meaning of = with -add, -pathspecs: SetInsert. (line 123)
* Insert, non-dashed arguments, -add_plainly: Insert. (line 68)
* Insert, path, -map: Insert. (line 89)
* Insert, path, -map_single: Insert. (line 93)
@ -6008,7 +6023,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Ownership, in ISO image, -chown_r: Manip. (line 47)
* Partition offset, _definition: Bootable. (line 315)
* Partition table, _definition: Bootable. (line 265)
* Pathspec, _definition: SetInsert. (line 117)
* Pathspec, _definition: SetInsert. (line 125)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 34)
* Pattern expansion, for ISO paths, -iso_rr_pattern: Manip. (line 10)
* Pattern expansion, _definition: Processing. (line 29)
@ -6053,23 +6068,23 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Rename, in ISO image, -move: Manip. (line 31)
* Rename, in ISO image, -mv: Manip. (line 37)
* Restore, copy boot equipment to disk, -extract_boot_images: Restore.
(line 167)
* Restore, copy file into disk file, -paste_in: Restore. (line 135)
* Restore, copy file piece to disk, -extract_cut: Restore. (line 101)
* Restore, copy file to disk, -extract_single: Restore. (line 94)
* Restore, copy file tree to disk, -extract: Restore. (line 83)
* Restore, copy file trees to disk, -cp_rx: Restore. (line 124)
* Restore, copy file trees to disk, -cp_rx <1>: Restore. (line 132)
* Restore, copy files to disk, -cpax: Restore. (line 121)
* Restore, copy files to disk, -cpx: Restore. (line 110)
* Restore, copy files to disk, -extract_l: Restore. (line 97)
* Restore, enable ISO-to-disk, -osirrox: Restore. (line 18)
(line 174)
* Restore, copy file into disk file, -paste_in: Restore. (line 142)
* Restore, copy file piece to disk, -extract_cut: Restore. (line 108)
* Restore, copy file to disk, -extract_single: Restore. (line 101)
* Restore, copy file tree to disk, -extract: Restore. (line 90)
* Restore, copy file trees to disk, -cp_rx: Restore. (line 131)
* Restore, copy file trees to disk, -cp_rx <1>: Restore. (line 139)
* Restore, copy files to disk, -cpax: Restore. (line 128)
* Restore, copy files to disk, -cpx: Restore. (line 117)
* Restore, copy files to disk, -extract_l: Restore. (line 104)
* Restore, enable ISO-to-disk, -osirrox: Restore. (line 25)
* Result layout, more shell-like, -sh_style_result: Scripting.
(line 61)
* Rock Ridge, _definition: Extras. (line 6)
* Session, altered start address, -displacement: Loading. (line 78)
* Session, info string, -session_string: Inquiry. (line 74)
* Session, issue mount command, -mount: Restore. (line 195)
* Session, issue mount command, -mount: Restore. (line 202)
* Session, log when written, -session_log: Scripting. (line 134)
* Session, mount command line, -mount_cmd: Inquiry. (line 49)
* Session, mount parameters, -mount_opts: Inquiry. (line 65)
@ -6140,46 +6155,46 @@ Node: AqDrive28961
Node: Loading36118
Node: Insert57957
Node: SetInsert69460
Node: Manip78892
Node: CmdFind88992
Node: Filter107921
Node: Writing112543
Node: SetWrite124798
Node: Bootable154649
Node: Jigdo182530
Node: Charset187533
Node: Exception190862
Node: DialogCtl196991
Node: Inquiry199593
Node: Navigate208475
Node: Verify217182
Node: Restore228331
Node: Emulation240030
Node: Scripting250486
Node: Frontend258269
Node: Examples267895
Node: ExDevices269073
Node: ExCreate269734
Node: ExDialog271034
Node: ExGrowing272305
Node: ExModifying273114
Node: ExBootable273624
Node: ExCharset274179
Node: ExPseudo275075
Node: ExCdrecord276002
Node: ExMkisofs276322
Node: ExGrowisofs278219
Node: ExException279372
Node: ExTime279830
Node: ExIncBackup280288
Node: ExRestore284314
Node: ExRecovery285260
Node: Files285832
Node: Environ287166
Node: Seealso287914
Node: Bugreport288631
Node: Legal289222
Node: CommandIdx290234
Node: ConceptIdx308059
Node: Manip79424
Node: CmdFind89524
Node: Filter108453
Node: Writing113075
Node: SetWrite125330
Node: Bootable155181
Node: Jigdo183062
Node: Charset188065
Node: Exception191394
Node: DialogCtl197523
Node: Inquiry200125
Node: Navigate209007
Node: Verify217714
Node: Restore228863
Node: Emulation240979
Node: Scripting251435
Node: Frontend259218
Node: Examples268844
Node: ExDevices270022
Node: ExCreate270683
Node: ExDialog271983
Node: ExGrowing273254
Node: ExModifying274063
Node: ExBootable274573
Node: ExCharset275128
Node: ExPseudo276024
Node: ExCdrecord276951
Node: ExMkisofs277271
Node: ExGrowisofs279168
Node: ExException280321
Node: ExTime280779
Node: ExIncBackup281237
Node: ExRestore285263
Node: ExRecovery286209
Node: Files286781
Node: Environ288115
Node: Seealso288863
Node: Bugreport289580
Node: Legal290171
Node: CommandIdx291183
Node: ConceptIdx309008

End Tag Table