Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
argonix
Commits
221e2f59
Commit
221e2f59
authored
Feb 21, 2019
by
Valentin Reis
Browse files
verbosity management.
parent
23781aae
Pipeline
#5480
passed with stage
in 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Argonix.hs
View file @
221e2f59
...
@@ -227,8 +227,8 @@ cleanSocket = sudoRemoveFile printWarning "socket"
...
@@ -227,8 +227,8 @@ cleanSocket = sudoRemoveFile printWarning "socket"
setupSystem
::
ArgsCommon
->
Shell
()
setupSystem
::
ArgsCommon
->
Shell
()
setupSystem
sa
=
do
setupSystem
sa
=
do
printInfo
"Setting the nix-build environment up."
doVerbose
$
printInfo
"Setting the nix-build environment up."
printInfo
"Cleaning sockets."
doVerbose
$
printInfo
"Cleaning sockets."
Prelude
.
mapM_
Prelude
.
mapM_
cleanSocket
cleanSocket
[
"/tmp/nrm-downstream-in"
[
"/tmp/nrm-downstream-in"
...
@@ -236,16 +236,16 @@ setupSystem sa = do
...
@@ -236,16 +236,16 @@ setupSystem sa = do
,
"/tmp/nrm-upstream-in"
,
"/tmp/nrm-upstream-in"
,
"/tmp/nrm-upstream-event"
,
"/tmp/nrm-upstream-event"
]
]
printInfo
"Setting up a cache directory:"
doVerbose
$
printInfo
"Setting up a cache directory:"
cachedir
<-
single
cachedir
<-
single
$
inproc
"mktemp"
[
"-d"
,
"/tmp/deletable-nix-cache-XXXX"
]
empty
$
inproc
"mktemp"
[
"-d"
,
"/tmp/deletable-nix-cache-XXXX"
]
empty
export
"XDG_CACHE_HOME"
$
lineToText
cachedir
export
"XDG_CACHE_HOME"
$
lineToText
cachedir
printInfo
$
lineToText
cachedir
<>
" exported to XDG_CACHE_HOME"
doVerbose
$
printInfo
$
lineToText
cachedir
<>
" exported to XDG_CACHE_HOME"
printInfo
"running nix-build for the containers attribute."
doVerbose
$
printInfo
"running nix-build for the containers attribute."
printCommand
$
"nix-build "
<>
pack
(
unwords
(
nixArguments
"containers"
sa
))
doVerbose
$
printCommand
$
"nix-build "
<>
pack
(
unwords
(
nixArguments
"containers"
sa
))
nodeos_config
<-
single
nodeos_config
<-
single
$
inproc
"nix-build"
(
fmap
pack
(
nixArguments
"containers"
sa
))
empty
$
inproc
"nix-build"
(
fmap
pack
(
nixArguments
"containers"
sa
))
empty
printInfo
"Checking filesystem attributes on /tmp"
doVerbose
$
printInfo
"Checking filesystem attributes on /tmp"
checkFsAttributes
"/tmp"
checkFsAttributes
"/tmp"
vshell
"sudo rm -rf /tmp/argo_nodeos_config"
empty
vshell
"sudo rm -rf /tmp/argo_nodeos_config"
empty
vshell
vshell
...
@@ -262,7 +262,9 @@ setupSystem sa = do
...
@@ -262,7 +262,9 @@ setupSystem sa = do
ExitFailure
n
->
die
(
"Setting suid bit failed with exit code "
<>
repr
n
)
ExitFailure
n
->
die
(
"Setting suid bit failed with exit code "
<>
repr
n
)
vshell
"sudo /tmp/argo_nodeos_config --clean_config=kill_content:true"
empty
vshell
"sudo /tmp/argo_nodeos_config --clean_config=kill_content:true"
empty
void
$
printInfo
"Done setting the environment for nix-build up."
void
$
printInfo
"Done setting the environment for nix-build up."
where
vshell
=
verboseShell
(
verbosity
sa
==
Verbose
)
where
vshell
=
verboseShell
verbose
verbose
=
verbosity
sa
==
Verbose
doVerbose
=
when
verbose
nixArguments
::
String
->
ArgsCommon
->
[
String
]
nixArguments
::
String
->
ArgsCommon
->
[
String
]
nixArguments
target
ArgsCommon
{
..
}
=
nixArguments
target
ArgsCommon
{
..
}
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment