[unpackfs] Allow naming a non-directory for single files
- this enables renaming files on copy
This commit is contained in:
parent
4acf63fd9a
commit
57c0b2088c
@ -390,7 +390,7 @@ def run():
|
||||
sourcefs = entry["sourcefs"]
|
||||
destination = os.path.abspath(root_mount_point + entry["destination"])
|
||||
|
||||
if not os.path.isdir(destination):
|
||||
if not os.path.isdir(destination) and sourcefs != "file":
|
||||
utils.warning(("The destination \"{}\" in the target system is not a directory").format(destination))
|
||||
if is_first:
|
||||
return (_("Bad unsquash configuration"),
|
||||
|
@ -60,8 +60,13 @@
|
||||
# - source: ../src/modules/dummycpp
|
||||
# sourcefs: file
|
||||
# destination: "/tmp/derp"
|
||||
#
|
||||
# The *destination* and *source* are handed off to rsync, so the semantics
|
||||
# of trailing slashes apply. In order to *rename* a file as it is
|
||||
# copied, specify one single file (e.g. CHANGES) and a full pathname
|
||||
# for its destination name, as in the example below.
|
||||
|
||||
unpack:
|
||||
- source: ../CHANGES
|
||||
sourcefs: file
|
||||
destination: "/tmp"
|
||||
destination: "/tmp/changes.txt"
|
||||
|
Loading…
Reference in New Issue
Block a user