From b7b62e156c59a32bfcb610cc455ed5c857d82d54 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 20 Mar 2023 15:33:41 +0200 Subject: [PATCH] wip [skip build] [skip test] --- aedi/target/tool_tier2.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aedi/target/tool_tier2.py b/aedi/target/tool_tier2.py index 8036cf2b..4de8f3cb 100644 --- a/aedi/target/tool_tier2.py +++ b/aedi/target/tool_tier2.py @@ -16,6 +16,7 @@ # along with this program. If not, see . # +import os import subprocess from ..state import BuildState @@ -105,19 +106,27 @@ class Radare2Target(base.MesonTarget): search_subpath = str(state.install_path) replace_subpath = '/usr/local' + userconf_path = state.build_path / 'r_userconf.h' + userconf_time = os.stat(userconf_path).st_mtime + def fix_paths(line: str): return line.replace(search_subpath, replace_subpath) if search_subpath in line else line - self.update_text_file(state.build_path / 'r_userconf.h', fix_paths) + self.update_text_file(userconf_path, fix_paths) + os.utime(userconf_path, (userconf_time, userconf_time)) # Fix commit hash in r_version.h tip_prefix = '#define R2_GITTIP ' tip_value = 'ab809417aa6b676922f95cf77861924eb90e7ef2' + version_path = state.build_path / 'r_version.h' + version_time = os.stat(version_path).st_mtime + def fix_commit(line: str): return f'{tip_prefix}"{tip_value}"\n' if line.startswith(tip_prefix) else line - self.update_text_file(state.build_path / 'r_version.h', fix_commit) + self.update_text_file(version_path, fix_commit) + os.utime(version_path, (version_time, version_time)) class SeverZipTarget(base.MakeTarget):