Question
· Oct 30

IPM package command failure: <VALUE OUT OF RANGE>zConstructTar+19^%ZPM.Utils.FileBinaryTar.1

I'm trying package IPM command but I'm getting the following error:

zpm:IPMTEST1>package -verbose -only -path /home/irisowner/ osex-ipm-hello

[IPMTEST1|osex-ipm-hello]       Package START
Exporting 'OSEX.ipm.hello.Hello.cls' to '/home/irisowner/src/OSEX/ipm/hello/Hello.cls'
Exported to /home/irisowner/module.xml
Module exported to:
        /home/irisowner/

[osex-ipm-hello]        Package FAILURE
ERROR! ObjectScript error: <VALUE OUT OF RANGE>zConstructTar+19^%ZPM.Utils.FileBinaryTar.1

What's wrong here?

I can see all the correct module files created:

$ pwd
/home/irisowner
$ ll module.xml src/OSEX/ipm/hello/Hello.cls
-rwxr-xr-x 1 irisowner irisowner 494 Oct 30 09:12 module.xml*
-rwxr-xr-x 1 irisowner irisowner 111 Oct 30 09:12 src/OSEX/ipm/hel

I'm running:

zpm:IPMTEST1>version

%SYS>     zpm          0.7.3
IPMTEST1> zpm-registry 1.3.2
https://pm.community.intersystems.com - 1.0.6
http://localhost:52773/registry/ - 1.3.2
Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2022.1.2 (Build 574_0_22161U) Tue Jan 24 2023 11:05:57 EST
Discussion (2)1
Log in or sign up to continue

Yeah, figured it out. The path have to point to either an empty existing directory or to an non-existing directory.

zpm:IPMTEST1>package -verbose -only -path /home/irisowner/module-package/ osex-ipm-hello

[IPMTEST1|osex-ipm-hello]       Package START
Exporting 'OSEX.ipm.hello.Hello.cls' to '/home/irisowner/module-package/src/OSEX/ipm/hello/Hello.cls'
Exported to /home/irisowner/module-package/module.xml
Module exported to:
        /home/irisowner/module-package/

Module package generated:
        /home/irisowner/module-package.tgz

However I see the following problems:

It's undocumented the name of the package is derived from the directory name.

The created directory structure is not cleaned after successful run.

The tar package contains unnecessary directories:

$ tar zvtf module-package.tgz
drwxr-xr-x 0/0               0 2024-10-30 07:51 module-package
drwxrwxr-x 0/0               0 2024-10-30 07:51 src//src
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX//OSEX
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX/ipm//ipm
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX/ipm/hello//hello
-rwxr-xr-x 0/0             111 2024-10-30 07:51 src/OSEX/ipm/hello//Hello.cls
-rwxr-xr-x 0/0             494 2024-10-30 07:51 module.xml

I'm expecting only src/OSEX/ipm/hello directory.