IRC channel logs
2021-10-30.log
back to list of logs
<dadinn>I am trying to install zfs-dkms so as to disable the ncurses window prompting to accept the openZFS CDDL license (I am using this in automated unattended tests). To do this I would have to run the command: `DEBIAN_FRONTEND=noninteractive apt install -y zfs-dkms`. This works fine on the command line. To achieve the same in Guile I am trying to run these two commands: (setenv "DEBIAN_FRONTEND" <dadinn>"noninteractive") and (system* "apt" "install" "-y" "zfs-dkms"). Unfortunately I keep getting prompted in the frontend. What am I doing wrong? <dadinn>it seems that the variable set by setenv doesn't get passed correctly to the child process? <dadinn>I am also not sure if there is any difference in behaviour between using setenv and putenv. Is one prefered over the other? <dadinn>apologies, managed to figure out the issue. The problem was in my code, accidentally ended up not calling the setenv procedure... now it works like a charm! :P <ajarara>dadinn: looking at the info pages setenv/putenv have the same description, just their argument API is different <ajarara>e.g. both specifically mention child processes inherit applied env variables <RhodiumToad>at the C level the distinction between putenv and setenv is in the memory management <RhodiumToad>in guile, setenv is just a small scheme wrapper on putenv <KREYREN>How do i declare that polo.scm is supposed to override the value set by marco.scm? *RhodiumToad not understanding the question? <KREYREN>RhodiumToad, e.g. in nix i have to do `lib.mkForce ...` for this behavior like overwritting the already declared value with a new one <lilyp>KREYREN: (operating-system (inherit (load "marco.scm")) (polo-stuff ...)) <KREYREN>i meant like doing (operating-system ...) (load "polo.scm") (operating-system ...) to like overwrite the value in the new file <lilyp>operating-system is a syntactic constructor <lilyp>it's semantically equivalent to (make-operating-system <a bunch of reordered field values>) <KREYREN>How can i make a logic that defines lot of values to operating-system across multiple files then? <lilyp>In the way I wrote or more easily by defining the parts as variables and importing them across the board <KREYREN>can you dumb that "way I wrote" for someone who is using guile for 2 hours x.x <lilyp>KREYREN: (operating-system (inherit (load "marco.scm")) (timezone "Europe/Paris") ...) <KREYREN>ehh i would have to dothe load for like 12 files is there more nicer looking way? <lilyp>What would be the nicer looking way? <KREYREN>(timezone "Europe/Prague) ? The shorter the definition the better <KREYREN>oh that would have to be `(my-timezone ...)` that then i would have to expand in `(operating-system)` right <lilyp>I don't think you can abbreviate field names that easily <lilyp>but see guix/packages.scm for how to do it anyway (the sha256 part)