[PATCH consfigurator] Add user property, modelled on apt property

Sean Whitton spwhitton at spwhitton.name
Sun Mar 7 23:48:06 GMT 2021


Hello David,

Thank you for sending this.

On Sun 07 Mar 2021 at 03:28PM -04, David Bremner wrote:

> diff --git a/src/property/user.lisp b/src/property/user.lisp
> new file mode 100644
> index 0000000..fdca269
> --- /dev/null
> +++ b/src/property/user.lisp
> +(in-package :consfigurator.property.user)
> +(named-readtables:in-readtable :interpol-syntax)
> +
> +(defprop has-account :posix (user-name)
> +  "ensure there is an account for USER-NAME."
> +  (:desc #?"account for ${user-name}")
> +  (:hostattrs
> +   (declare (ignore user-name))
> +   (os:required 'os:unixlike))

I'm wondering whether there is any point to this hostattrs check --
given that Consfigurator's baseline is a POSIX sh, every OS we try to
apply properties to is going to be unixlike, right?

If there's no particular reason to have it, then dropping it probably
makes the defprop easier to read.

-- 
Sean Whitton



More information about the sgo-software-discuss mailing list