mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-13 17:29:45 +08:00
local builds: provide a useful error message for a non-xyz base module
If allow_only_compatible_base_modules=True, then it's an error if the module buildrequires a non-xyz base module stream. Give an error message that says how to override the base module in the modulemd file.
This commit is contained in:
@@ -17,7 +17,7 @@ from module_build_service.builder.MockModuleBuilder import (
|
||||
import_builds_from_local_dnf_repos, load_local_builds
|
||||
)
|
||||
from module_build_service.common import conf, models
|
||||
from module_build_service.common.errors import StreamAmbigous
|
||||
from module_build_service.common.errors import StreamAmbigous, StreamNotXyz
|
||||
from module_build_service.common.logger import level_flags
|
||||
from module_build_service.common.utils import load_mmd_file, import_mmd
|
||||
import module_build_service.scheduler.consumer
|
||||
@@ -217,7 +217,11 @@ def build_module_locally(
|
||||
except StreamAmbigous as e:
|
||||
logging.error(str(e))
|
||||
logging.error("Use '-s module_name:module_stream' to choose the stream")
|
||||
return
|
||||
return 1
|
||||
except StreamNotXyz as e:
|
||||
logging.error(str(e))
|
||||
logging.error("Use '--buildrequires name:stream' to override the base module stream")
|
||||
return 1
|
||||
|
||||
module_build_ids = [build.id for build in module_builds]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user