Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cameronbraid
Copy link

Only provide a default value for "root" global argument if the current system is identified as a serpent os.

Currently uses the MACHTYPE env for detection

Manually tested on a arch system :

> moss list installed
Error: args: Root directory is required, but not provided

And when we fake then env we get an expected error

> MACHTYPE=serpent moss list installed
Error: list: client: db: diesel connection: Unable to open the database file

Only provide a default value for "root" global argument if the current system is identified as a serpent os.

Currently uses the MACHTYPE env for detection
@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
All committers have signed the CLA.

@Quackdoc
Copy link

Would it not be better to check /usr/lib/os-release ? I know MACHTYPE can sometimes change depending on shell.

also this seems like it would limit moss to working on serpent as the system package manager. perhaps there could be a better way of doing this. Could this be set via config or something?

@cameronbraid
Copy link
Author

What about changing the default back to / and add an assertion that "$root/.moss" folder is present

@cameronbraid
Copy link
Author

cameronbraid commented Feb 13, 2025

Although, this might suggest that a separate moss init command should be added as the only means to create a .moss installation... then all other commands could fail if the directory its not a valid installation

@ermo
Copy link
Member

ermo commented Feb 14, 2025

The idea of having a well thought out moss init feature that checks for the relevant preconditions etc. sounds compelling.

This migh also tie nicely into potentially setting up the proper minimum SELinux policy for /.moss and /usr in the future.

@ermo ermo added this to the alpha1 milestone Apr 17, 2025
@ermo
Copy link
Member

ermo commented Apr 17, 2025

@cameronbraid You still up for working on this?

@ermo ermo removed this from the alpha1 milestone Apr 17, 2025
@ermo ermo added this to the alpha2 milestone May 8, 2025
@ermo ermo added type: user experience Will make for a nicer user experience priority: could have labels May 27, 2025
@ermo ermo marked this pull request as draft June 11, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: could have type: user experience Will make for a nicer user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants