forked from rosa/hakurei
cmd/mbf: shallow by default
This is going to be used most of the time, with --deep only useful for fetching bootstrap artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -28,6 +28,8 @@ type cache struct {
|
|||||||
idle bool
|
idle bool
|
||||||
// Unset [pkg.CSuppressInit].
|
// Unset [pkg.CSuppressInit].
|
||||||
verboseInit bool
|
verboseInit bool
|
||||||
|
// Unset [pkg.CExternShallow].
|
||||||
|
deep bool
|
||||||
// Loaded artifact of [rosa.QEMU].
|
// Loaded artifact of [rosa.QEMU].
|
||||||
qemu pkg.Artifact
|
qemu pkg.Artifact
|
||||||
|
|
||||||
@@ -57,6 +59,9 @@ func (cache *cache) open() (err error) {
|
|||||||
if !cache.verboseInit {
|
if !cache.verboseInit {
|
||||||
flags |= pkg.CSuppressInit
|
flags |= pkg.CSuppressInit
|
||||||
}
|
}
|
||||||
|
if !cache.deep {
|
||||||
|
flags |= pkg.CExternShallow
|
||||||
|
}
|
||||||
|
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
defer close(done)
|
defer close(done)
|
||||||
|
|||||||
@@ -217,6 +217,11 @@ func main() {
|
|||||||
&cm.mirror,
|
&cm.mirror,
|
||||||
"r", command.StringFlag("$MBF_REMOTE"),
|
"r", command.StringFlag("$MBF_REMOTE"),
|
||||||
"URL of mirror service",
|
"URL of mirror service",
|
||||||
|
).Flag(
|
||||||
|
&cm.deep,
|
||||||
|
"deep", command.BoolFlag(false),
|
||||||
|
"Cure all inputs even when the required artifact is available "+
|
||||||
|
"via the mirror service",
|
||||||
).Flag(
|
).Flag(
|
||||||
&cm.idle,
|
&cm.idle,
|
||||||
"sched-idle", command.BoolFlag(false),
|
"sched-idle", command.BoolFlag(false),
|
||||||
|
|||||||
Reference in New Issue
Block a user