Closed niraami closed 3 years ago
My two cents (plus tax where applicable).
Is this dotbot's fault?
No. dotbot-sudo performs actions in a sub-process (via execute_plugin.py
). Because of this is, all sudo commands are running outside the environment setup by dotbot. execute_plugin.py
would be responsible for setting up an environment similar to the one created by dotbot. More on this later.
Is the error intended?
Tough to say. On the surface, no. But there maybe some limitations with the python runtime regarding loading of the same resource by multiple processes. I'm not experienced enough to know how that all works off the top of my head, but I'm experienced enough to bang on it for a bit as a test.
Is this fixible?
Again, tough to say. I'll point out that execute_plugin.py looks very similar to dotbot. This makes me think that it's a simple matter of execute_plugin.py
injecting the path information to the bundled pyyaml stuff. But again, I'm not sure if this has been tried already and it's intentional that doing this has been removed from execute_plugin.py
.
I'd like to play around with this for a bit to see what can be fixed but I won't have time to do so until early next week. I'll check back on this next week and try some things if this issue is still open.
thank you for the info. This is not intended behaviour.
My idea was to import dotbot itself so there are no dependencies to be installed.
Would be great if you find a solution.
Thanks
@niraami, I've submitted PR #3. I did some light testing with this updated on my system using virtual environment and did not have any issues with pyyaml references. If you could spare the time and are able, would you be willing to give these updates a go to see if this works for you?
Can't comment on the changes themselves, but this does resolve my initial issue. Later today I'll also test it on a clean system in a vm, but just uninstalling python-yaml
before could bring back the issue for me, which it doesn't anymore, so, according to my testing methology it's fixed :D
All commands have been executed
sudo: begin subprocess
Link exists /etc/vconsole.conf -> /home/niraami/.dotfiles/system/etc/vconsole.conf
Link exists /etc/X11/xorg.conf.d/00-keyboard.conf -> /home/niraami/.dotfiles/system/etc/X11/xorg.conf.d/00-keyboard.conf
Link exists /usr/share/themes/Midnight-GrayNight -> /home/niraami/.dotfiles/system/usr/share/themes/Midnight-GrayNight
All links have been set up
A little later than I wanted, but I tested it on a clean arch install (I was planning to reinstall anyways, so I just waited till the weekend so I had more time) and it works great, no issues here.
Seems that running dotbot-sudo requires a system wide pyyaml installation (such as python-yaml) - meaning that it for some reason doesn't use the bundled one. I've got minimal experience in python.. which is why I'm raising this issue - meaning I've got no idea if this is intended, fixable or dotbots fault. If it's intended, take this as a suggestion to put a disclaimer in the readme, casue I can totally just install
python-yaml
earlier in the process usingdotbot-yay
.Traceback:
Dotbot install script:
install.conf.yaml
: