unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* more than one target service shehperd-root / possible scheme records terribleness
@ 2021-03-03 10:59 raingloom
  2021-03-03 12:35 ` Joshua Branson
  2021-03-03 13:06 ` Ricardo Wurmus
  0 siblings, 2 replies; 4+ messages in thread
From: raingloom @ 2021-03-03 10:59 UTC (permalink / raw)
  To: bug-guix@gnu.org

I have an operating-system called bingobongo. I have another called
greg that inherits the bingobongo config. If I leave the services field
empty in greg, there is no issue. If I define it as
(operating-system-services bingobongo) then all hell breaks loose and I
get the aforementioned error and no amount of filtering seems to fix it
becaues then I get the same error but with "profile" instead of
shepherd-root.

Now, I don't know what causes this, whether it's a Guix issue or
Guile's record system being... well... kind of terrible, but in any
case it should be treated like a bug, because a user should not have to
dig as deeply into Guix internals as I have so far.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: more than one target service shehperd-root / possible scheme records terribleness
  2021-03-03 10:59 more than one target service shehperd-root / possible scheme records terribleness raingloom
@ 2021-03-03 12:35 ` Joshua Branson
  2021-03-03 13:06 ` Ricardo Wurmus
  1 sibling, 0 replies; 4+ messages in thread
From: Joshua Branson @ 2021-03-03 12:35 UTC (permalink / raw)
  To: raingloom; +Cc: bug-guix@gnu.org

raingloom <raingloom@riseup.net> writes:

> I have an operating-system called bingobongo. I have another called
> greg that inherits the bingobongo config. If I leave the services field
> empty in greg, there is no issue. If I define it as
> (operating-system-services bingobongo) then all hell breaks loose and I
> get the aforementioned error and no amount of filtering seems to fix it
> becaues then I get the same error but with "profile" instead of
> shepherd-root.
>
> Now, I don't know what causes this, whether it's a Guix issue or
> Guile's record system being... well... kind of terrible, but in any
> case it should be treated like a bug, because a user should not have to
> dig as deeply into Guix internals as I have so far.

Can you show us some code?  That may help.

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: more than one target service shehperd-root / possible scheme records terribleness
  2021-03-03 10:59 more than one target service shehperd-root / possible scheme records terribleness raingloom
  2021-03-03 12:35 ` Joshua Branson
@ 2021-03-03 13:06 ` Ricardo Wurmus
  2021-03-03 16:07   ` Simon South
  1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2021-03-03 13:06 UTC (permalink / raw)
  To: raingloom; +Cc: help-guix


raingloom <raingloom@riseup.net> writes:

> I have an operating-system called bingobongo. I have another called
> greg that inherits the bingobongo config. If I leave the services field
> empty in greg, there is no issue. If I define it as
> (operating-system-services bingobongo) then all hell breaks loose and I
> get the aforementioned error and no amount of filtering seems to fix it
> becaues then I get the same error but with "profile" instead of
> shepherd-root.

This is not a very clear report.  What filtering leads to a “profile”
error?

> Now, I don't know what causes this, whether it's a Guix issue or
> Guile's record system being... well... kind of terrible

No, Guile’s records are fine.  “Terrible” is a strong word for a wild
guess.

The issue here is likely that operating-system-services returns all
services, including those that are added by the operating system
machinery.  Since your new operating system would run that same
machinery to add root services to the graph you’ll end up with some
duplicates.  If this is in fact the case then the fix is to either make
those root services explicit (meh), or to let operating-system-services
return only explicitly listed services, or to add another procedure (or
a keyword argument ot operating-system-services) that lets users specify
the depth of the result set.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: more than one target service shehperd-root / possible scheme records terribleness
  2021-03-03 13:06 ` Ricardo Wurmus
@ 2021-03-03 16:07   ` Simon South
  0 siblings, 0 replies; 4+ messages in thread
From: Simon South @ 2021-03-03 16:07 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Ricardo Wurmus <rekado@elephly.net> writes:
> The issue here is likely that operating-system-services returns all
> services, including those that are added by the operating system
> machinery.

Yes. I ran into this myself the other day.

The solution seems to be to use "operating-system-user-services" in
place of "operating-system-services" (see gnu/system.scm:263). This is
certainly non-intuitive though.

-- 
Simon South
simon@simonsouth.net


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-03 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 10:59 more than one target service shehperd-root / possible scheme records terribleness raingloom
2021-03-03 12:35 ` Joshua Branson
2021-03-03 13:06 ` Ricardo Wurmus
2021-03-03 16:07   ` Simon South

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).