Packaging (exporting) operation is not idempotent
When running zpm-registry package -only -DPath=/tmp/exported/zpm-registry -verbose for the first time, it creates a folder and a tarball
zpm-registry
zpm-registry.tgz
However, when subsequently running the command for a second time, 4 more files are created:
zpm-registr.tgz
zpm-registry
zpm-registry.modules
zpm-registry.tgz
zpm-registrymodule.xml
zpm-registrysrc
What's that -DPath flag? The v0.7.3 help doesn't know about it. I was expecting to see -path here.
A related issue: The package command doesn't clean up the temporary directory it creates. IMO the result of the command is the module package (i.e. tar) file, not the directory. Or is there some point of view I don't get?
@janihur
What's that
-DPathflag? The v0.7.3 help doesn't know about it. I was expecting to see-pathhere.
It's a way to pass "data" to IPM commands. You're right that it's not documented and we will probably deprecate such usage in favor of -path modifier in the future. I'm going to open a PR for this.
@isc-tleavitt @isc-kiyer
A related issue: The
packagecommand doesn't clean up the temporary directory it creates. IMO the result of the command is the module package (i.e. tar) file, not the directory. Or is there some point of view I don't get?
Is there any reason we keep the directory in addition to the tarball or shall I go ahead and remove it? If we remove it, we probably solve the main thread issue as well.
Is there any reason we keep the directory in addition to the tarball or shall I go ahead and remove it? If we remove it, we probably solve the main thread issue as well.
@isc-shuliu I can't think of a reason to keep it so best to remove the directory since only the tarball is needed for both packaging and publishing. A user can always unpack the tarball to view the directory structure
Also consider the case when the package tar file already exists. Automatic overwrite or something else? I don't see here a clear winner as long as the behavior is documented.