-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline volume decleration support for distrobox-assemble
#1534
Conversation
I don't think this is necessary. As of distrobox: 1.7.2.1, your example produces (with /usr/bin/distrobox-create --yes --name example --image docker.io/library/debian:latest \
--no-entry --home /home/trs/.distros/debian --hostname debian \
--additional-packages " package1 package2 package3" \
--volume " /home/trs/path1:/path1 /home/trs/path2:/path2" \
--volume /home/trs/path3:/path3 \
--volume /home/trs/path4:/path4 And running that with And neither the existing code nor your version handles paths with spaces in them properly, so I don't think this patch is needed anymore. |
@softmoth I suggest you try making a distrobox instead of dry run. The build fails. testing.ini file:
Shell interaction:
|
It's strange, regardelss of However, I did find this related issue that has a simpler fix for the problem I think: #1514 (comment) . I prefer it slightly as it addresses the root issue of empty volume names, and it keeps the I guess it's not quite right to mention in docs that the multi-line feature is new, since it's clearly the intended behavior in the code. I guess it's best to mention as a bug fix in the Changelog (which affects some host operating systems and not others, maybe, since it works for me but not for you?). |
Oh! I see... Indeed fixing the mentioned code would be a better solution. I'm using podman, on Debain testing system if that helps ... |
Implemented the suggested solution on #1514 (comment) . Code working fine. Do I create new PR? |
I'm just a user like you, not a maintainer of distrobox. That said, I think it's fine to just force-push to the same branch on this PR. |
you can do the fix in this PR |
volume="/games:/games" | ||
volume="/usr/games:/usr/games /usr/local/games:/usr/local/games" | ||
|
||
\* _Note :_ Multi-line volume decleration is available from (ToDo: Mention version) |
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.
We can remove this
@@ -437,9 +437,11 @@ run_distrobox() | |||
fi | |||
if [ -n "${volume}" ]; then | |||
IFS="¤" | |||
args="" | |||
for vol in ${volume}; do |
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.
We can just implement this: #1514 (comment)
Fixed in cbf9f88 as part of similar fixes for other multilines |
Like
additional_packages
can be decleared in multiple line, it can't be done for volumes. For reference, running distrobox assemble dry run on the example.ini file:Current version gives:
This update intends to fix this by taking them all as a arg of
--volume
commandAfter modification:
Please Note : There is a line in documentation which needs mention of the version no. from which the feature will be available