-
Notifications
You must be signed in to change notification settings - Fork 142
Make the workspace path relative to the manifest file #444
Changes from all commits
4fc6400
dfe7b8a
50c54af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,7 +22,7 @@ def run(cls, info): | |||||||||||||||||||
|
||||||||||||||||||||
full_path = os.path.join(info.root, folder) | ||||||||||||||||||||
os.chmod(temp_path, os.stat(full_path).st_mode) | ||||||||||||||||||||
info.volume.partition_map.root.add_mount(temp_path, full_path, ['--bind']) | ||||||||||||||||||||
info.volume.partition_map.root.add_mount(temp_path, folder, ['--bind']) | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. full path is not required as it is possible to mount directory with relative paths, like this:
Actually with
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait. This suggests bootstrap-vz/bootstrapvz/common/tasks/filesystem.py Lines 59 to 67 in a4e4ad9
Are you sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be, yes. Can you check if this was the case before the change? |
||||||||||||||||||||
|
||||||||||||||||||||
|
||||||||||||||||||||
class RemoveFolderMounts(Task): | ||||||||||||||||||||
|
@@ -35,9 +35,8 @@ def run(cls, info): | |||||||||||||||||||
import shutil | ||||||||||||||||||||
for folder in folders: | ||||||||||||||||||||
temp_path = os.path.join(info._minimize_size['foldermounts'], folder.replace('/', '_')) | ||||||||||||||||||||
full_path = os.path.join(info.root, folder) | ||||||||||||||||||||
|
||||||||||||||||||||
info.volume.partition_map.root.remove_mount(full_path) | ||||||||||||||||||||
info.volume.partition_map.root.remove_mount(folder) | ||||||||||||||||||||
shutil.rmtree(temp_path) | ||||||||||||||||||||
|
||||||||||||||||||||
os.rmdir(info._minimize_size['foldermounts']) | ||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this adds some semantic info to the code, I like it.