intersystems / ipm

InterSystems ObjectScript Package Manager
MIT License
28 stars 19 forks source link

Released artifact doesn't load correctly for certain docker images #493

Closed isc-shuliu closed 1 month ago

isc-shuliu commented 1 month ago

Environment

The released artifacts cannot be loaded correctly on certain platforms. I tried to install zpm-0.7.1.xml on docker image containers.intersystems.com/intersystems/iris-community-arm64:2024.1.

Reproduce

The output is

USER>set sc = ##class(%SYSTEM.OBJ).Load("/home/irisowner/zpm.xml", "ck")

Load started on 06/03/2024 17:55:56
Loading file /home/irisowner/zpm.xml as xml
Imported class: %ZPM.Installer
Compiling class %ZPM.Installer
Compiling routine %ZPM.Installer.1
Extract package
Install ZPM
2024-06-03 17:55:56 0 %ZPM.Installer: Installation starting at 2024-06-03 17:55:56, LogLevel=3
2024-06-03 17:55:56 3 Evaluate: ${MODDIR}src -> /usr/irissys/mgr/user/-28/src
2024-06-03 17:55:56 3 SetVariable: SRCDIR=/usr/irissys/mgr/user/-28/src/
2024-06-03 17:55:56 3 SetVariable: REGISTRY=https://pm.community.intersystems.com
2024-06-03 17:55:56 3 SetVariable: TRACKINGID=UA-126752118-1
2024-06-03 17:55:56 3 Evaluate: ${SRCDIR} -> /usr/irissys/mgr/user/-28/src/
2024-06-03 17:55:56 1 Import: Loading /usr/irissys/mgr/user/-28/src/ (isdir=0) into %SYS, recurse=1

Load started on 06/03/2024 17:55:56

ERROR #5012: File '/usr/irissys/mgr/user/-28/src/' does not exist
Detected 1 errors during load.
2024-06-03 17:55:56 0 %ZPM.Installer: ERROR #5012: File '/usr/irissys/mgr/user/-28/src/' does not exist
2024-06-03 17:55:56 0 %ZPM.Installer: Installation failed at 2024-06-03 17:55:56
2024-06-03 17:55:56 0 %Installer: Elapsed time .000893s
Time spent 1.006259
ERROR #5012: File '/usr/irissys/mgr/user/-28/src/' does not exist
  > ERROR #5090: An error has occurred while creating projection %ZPM.Installer:Reference.
Detected 1 errors during load.

Clues

Apparently the MODDIR variable in the .xml file is somehow evaluated to /usr/irissys/mgr/user/-28/. Not sure where the -28 comes from. In ASCII table, 28 (as decimal) is file separator. Not sure if it's related.

On the other hand, running the above command on native IRIS (macOS ARM64 version) works fine.

isc-shuliu commented 1 month ago

This is a strange issue that I cannot reproduce on my company issued laptop. I encountered this problem on my personal device (while my company-issued laptop is in repair). Both devices are M-series MacBook Pros.

I'll close it for now and can reopen if anyone gets the same error in the future.