Commit 086624a 1 parent 90d1878 commit 086624a Copy full SHA for 086624a
File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ def mtree_mutate(
130
130
name ,
131
131
mtree ,
132
132
strip_prefix = None ,
133
+ package_dir = None ,
133
134
mtime = None ,
134
135
owner = None ,
135
136
ownername = None ,
@@ -141,6 +142,7 @@ def mtree_mutate(
141
142
name: name of the target, output will be `[name].mtree`.
142
143
mtree: input mtree file, typically created by `mtree_spec`.
143
144
strip_prefix: prefix to remove from all paths in the tar. Files and directories not under this prefix are dropped.
145
+ package_dir: directory prefix to add to all paths in the tar.
144
146
mtime: new modification time for all entries.
145
147
owner: new uid for all entries.
146
148
ownername: new uname for all entries.
@@ -150,6 +152,8 @@ def mtree_mutate(
150
152
vars = []
151
153
if strip_prefix :
152
154
vars .append ("-v strip_prefix='{}'" .format (strip_prefix ))
155
+ if package_dir :
156
+ vars .append ("-v package_dir='{}'" .format (package_dir ))
153
157
if mtime :
154
158
vars .append ("-v mtime='{}'" .format (mtime ))
155
159
if owner :
Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ mtree_mutate(
337
337
name = "modified1" ,
338
338
mtree = "source-casync.mtree" ,
339
339
strip_prefix = "xattr" ,
340
+ package_dir = "test" ,
340
341
)
341
342
342
343
diff_test (
Original file line number Diff line number Diff line change 1
- xattr.go type=file mode=0664 size=984 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=a2700b603df30c3b0a91bdcf9045e64aea42f62647b0128ea154f51a0c48991e
2
- xattr_test.go type=file mode=0664 size=859 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=91294ea554801b75f6a9e33c268807c9620b531eb813ea24512dd4eeaf0592e4
3
- xattr_unsupported.go type=file mode=0664 size=509 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=81ced06a1cdf88c4936d10bbf8d46edc2d42dc26efeed3691ddbeeb469865f8a
4
- xattr_unsupported_test.go type=file mode=0664 size=877 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=46605a03a985c7a3a4ab1a488f81382db4865f77b90b6a2b32693af39a8e1fba
1
+ test/ xattr.go type=file mode=0664 size=984 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=a2700b603df30c3b0a91bdcf9045e64aea42f62647b0128ea154f51a0c48991e
2
+ test/ xattr_test.go type=file mode=0664 size=859 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=91294ea554801b75f6a9e33c268807c9620b531eb813ea24512dd4eeaf0592e4
3
+ test/ xattr_unsupported.go type=file mode=0664 size=509 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=81ced06a1cdf88c4936d10bbf8d46edc2d42dc26efeed3691ddbeeb469865f8a
4
+ test/ xattr_unsupported_test.go type=file mode=0664 size=877 uid=1000 gid=1000 uname=vbatts gname=vbatts time=1512774394.470900767 sha512256digest=46605a03a985c7a3a4ab1a488f81382db4865f77b90b6a2b32693af39a8e1fba
You can’t perform that action at this time.
0 commit comments