diff options
author | prettyboy <prettyboy@yandex-team.com> | 2023-09-10 08:19:33 +0300 |
---|---|---|
committer | prettyboy <prettyboy@yandex-team.com> | 2023-09-10 08:41:35 +0300 |
commit | bd07cd341fd0ab69c78f657bd8ea152d37311df2 (patch) | |
tree | ce02c47433b44394778f08bcbdced2dc02ce4786 | |
parent | 001d6136181e7f74682143d6dbe0e7699d20313c (diff) | |
download | ydb-bd07cd341fd0ab69c78f657bd8ea152d37311df2.tar.gz |
[devtools/ya/core/config] Use opensource confs in opensource ya
-rw-r--r-- | build/plugins/res.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build/plugins/res.py b/build/plugins/res.py index 31f9d77c10..f2b1d970d1 100644 --- a/build/plugins/res.py +++ b/build/plugins/res.py @@ -112,13 +112,18 @@ def on_ya_conf_json(unit, conf_file): unit.onsrcdir(conf_dir) unit.onresource_files(os.path.basename(conf_file)) + valid_dirs = ( + "build", + conf_dir, + ) + with open(conf_abs_path) as f: conf = json.load(f) formulas = set() for bottle_name, bottle in conf['bottles'].items(): formula = bottle['formula'] if isinstance(formula, six.string_types): - if formula.startswith(conf_dir): + if formula.startswith(valid_dirs): abs_path = unit.resolve('$S/' + formula) if os.path.exists(abs_path): formulas.add(formula) @@ -131,7 +136,7 @@ def on_ya_conf_json(unit, conf_file): else: ymake.report_configure_error( 'File "{}" (referenced from bottle "{}" in "{}") must be located in "{}" file tree'.format( - formula, bottle_name, conf_file, conf_dir + formula, bottle_name, conf_file, '" or "'.join(valid_dirs) ) ) for formula in formulas: |