Skip to content

Commit

Permalink
re-evaluate with fetched version
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlatwe.lai committed Jun 11, 2021
1 parent acff9aa commit e5ffd88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/deliver/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def _generate_dev_packages(self, family):
developer = DeveloperPackage.from_path(dirpath)

data = developer.data.copy()
data["__ver_tag__"] = ver_tag
data["__source__"] = developer.filepath
version = data.get("version", "_NO_VERSION")

Expand Down
16 changes: 10 additions & 6 deletions src/deliver/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from deliver.repository import PackageLoader
from deliver.exceptions import RezDeliverRequestError, RezDeliverFatalError
from deliver.lib import os_chdir, override_config, expand_path
from deliver.lib import os_chdir, override_config, expand_path, temp_env


class Required(object):
Expand Down Expand Up @@ -459,11 +459,15 @@ def _re_evaluate_variant(self, variant, context=None):

pkg_path = os.path.dirname(filepath)
with override_config(self.loader.settings), os_chdir(pkg_path):
re_evaluated_package = package.get_reevaluated({
"building": True,
"build_variant_index": variant.index or 0,
"build_variant_requires": variant.variant_requires
})

ver_tag = package.data.get("__ver_tag__", "__no_remote__")
with temp_env("REZ_DELIVER_PKG_PAYLOAD_VER", ver_tag):

re_evaluated_package = package.get_reevaluated({
"building": True,
"build_variant_index": variant.index or 0,
"build_variant_requires": variant.variant_requires
})

re_evaluated_package.set_context(context)
re_evaluated_variant = re_evaluated_package.get_variant(variant.index)
Expand Down

0 comments on commit e5ffd88

Please sign in to comment.