Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Cannot pass a directory as a list of presets #77

Open
stratosgear opened this issue Sep 27, 2021 · 1 comment
Open

Cannot pass a directory as a list of presets #77

stratosgear opened this issue Sep 27, 2021 · 1 comment

Comments

@stratosgear
Copy link

Describe the bug
I am running alma and trying to pass a directory, as a list of presets, and contrary to the readme instructions about using a directory, alma fails with:

➜ ALMA_USER="stratos" TIMEZONE="Europe/Madrid" sudo -E alma create -e --presets ./arch-i3-usb/preset ./arch-i3-usb/additional --image 10GiB almatest.img
 2021-09-27 12:46:50 ERROR alma > Error loading preset "./arch-i3-usb/preset"
 2021-09-27 12:46:50 ERROR alma > Caused by: Is a directory (os error 21)

(BTW, I am using a useful set of presets from https://github.com/jamesmcm/arch-i3-usb)

It seems that if I use *.toml as in:

➜ ALMA_USER="stratos" TIMEZONE="Europe/Madrid" sudo -E alma create -e --presets ./arch-i3-usb/preset/*.toml ./arch-i3-usb/additional/*.toml --image 10GiB almatest.img

it "seems" to work, but I later get:


         __                                     __   
  ____  / /_     ____ ___  __  __   ____  _____/ /_  
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ 
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / 
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  
                        /____/                       ....is now installed!


Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.

• Follow us on Twitter: https://twitter.com/ohmyzsh
• Join our Discord community: https://discord.gg/ohmyzsh
• Get stickers, t-shirts, coffee mugs and more: https://shop.planetargon.com/collections/oh-my-zsh

cp: cannot stat '/shared_dirs/startup_config/xprofile': No such file or directory
chown: cannot access '/home/stratos/.xprofile': No such file or directory
chgrp: cannot access '/home/stratos/.xprofile': No such file or directory
 2021-09-27 12:29:25 INFO  alma::storage::loop_device > Detaching loop device /dev/loop0
 2021-09-27 12:29:25 ERROR alma                       > Post installation configuration error
 2021-09-27 12:29:25 ERROR alma                       > Caused by: exit status: 1

which seems to be an issue of accessing the startup_config directory as defined in https://github.com/jamesmcm/arch-i3-usb/blob/master/preset/22-startup.toml

I thought that there was something wrong with that preset and turned it off, and rerun it. Unfortunately any other preset that seems to be using shared dirs fails with the same error :(

I'm not good enough with rust to figure out what the issue is. Any ideas?

Thanks for an otherwise (it seems) excellent tool... :)

@EdJoPaTo
Copy link
Contributor

I looked into my script and it uses --presets ./presets/*.toml. This is helpful when testing only configs starting with 0 for example as its easily changed into ./presets/0*.toml.

This doesnt solve the problem but maybe helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants