Skip to content

Commit d1bbeb7

Browse files
committed
Add more diagostic logging to recommended pkgs Makefile
1 parent 4ff3129 commit d1bbeb7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

com.oracle.truffle.r.native.recommended/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ install.recommended: $(GNUR_RECOMMENDED_TARS)
9191
echo "The checksum of FastR header files does not match the checksum that the recommended packages were build against."; \
9292
echo "You can run appropriate CI jobs in FastR repo to generate a new version of recommended packages binary and then upload it to the appropriate place."; \
9393
echo "******************************"; \
94+
echo "Actual checksum of FastR headers:"; \
95+
echo "$(mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr)"; \
96+
echo "Expected checksum by the recommended pkgs:"; \
97+
cat $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt; \
98+
echo "******************************"; \
9499
exit 1; \
95100
fi
96101
cp -R $(FASTR_RECOMMENDED_BINARY)/pkgs/* $(FASTR_R_HOME)/library

mx.fastr/mx_fastr.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,12 +896,16 @@ def build_binary_pkgs(args_in, **kwargs):
896896
for pkg_name in args.recommended_list.split(','):
897897
shutil.copytree(os.path.join(_fastr_suite.dir, 'library', pkg_name), os.path.join(pkgs_pkgs_path, pkg_name))
898898
# add file with API digest
899+
import io
900+
string_io = io.StringIO()
899901
try:
900-
with open(os.path.join(pkgs_path, 'api-checksum.txt'), 'w') as f:
901-
sys.stdout = f
902-
pkgcache(['--print-api-checksum', '--vm', 'fastr'])
902+
sys.stdout = string_io
903+
pkgcache(['--print-api-checksum', '--vm', 'fastr'])
903904
finally:
904905
sys.stdout = sys.__stdout__
906+
with open(os.path.join(pkgs_path, 'api-checksum.txt'), 'w') as f:
907+
checksum = string_io.getvalue().splitlines(keepends=False)[-1]
908+
print(checksum, f)
905909
# creates the tarball
906910
result_tarball = os.path.join(dest_dir, pkgs_name + '.tar.gz')
907911
with tarfile.open(result_tarball, "w:gz") as tar:

0 commit comments

Comments
 (0)