Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load tarball - IPM look for dependency from repo instead #721

Open
jinlouISC opened this issue Jan 30, 2025 · 4 comments · Fixed by #726
Open

Load tarball - IPM look for dependency from repo instead #721

jinlouISC opened this issue Jan 30, 2025 · 4 comments · Fixed by #726
Labels
bug Something isn't working prio: high release blocker Blocks the next release
Milestone

Comments

@jinlouISC
Copy link

jinlouISC commented Jan 30, 2025

Environment:
IPM v0.10.beta-4 on an I4H instance with no repo configured.

Background:
The module has dependencies. The tarball includes all the dependency modules.

Behavior:
When I do zpm "load ", it stopped at the first dependency hs.rest, "Could not find satisfactory version of hs.rest in any repositories. Required by: healthshare.hp.pas: ^2.1.0". I think it is looking for the dependency from the repository, not from the tarball.

In contrast, on a instance with a repo configured, when I load the tarball, IPM would install the dependencies from the repo, not from the tarball.

@isc-shuliu

@isc-shuliu isc-shuliu added bug Something isn't working prio: high labels Jan 31, 2025
@isc-shuliu isc-shuliu added this to the February 2025 milestone Jan 31, 2025
@isc-shuliu
Copy link
Collaborator

isc-shuliu commented Jan 31, 2025

Minimum reproducible example

/tmp/load-export-deps/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
  <Document name="load-export-deps.ZPM">
    <Module>
      <Name>load-export-deps</Name>
      <Version>0.0.1</Version>
      <Packaging>module</Packaging>
    </Module>
  </Document>
</Export>

/tmp/load-export/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
  <Document name="load-export.ZPM">
    <Module>
      <Name>load-export</Name>
      <Version>0.0.1</Version>
      <Packaging>module</Packaging>
      <Dependencies>
        <ModuleReference>
          <Name>load-export-deps</Name>
          <Version>0.0.1</Version>
        </ModuleReference>
      </Dependencies>
    </Module>
  </Document>
</Export>

Then run,

zpm "repo -fs -name local -path /tmp"
zpm "install load-export"
zpm "load-export package -export-deps 1 -DPath=/tmp/package -v"
zpm "repo -delete-all"
zpm "uninstall load-export-deps"
zpm "uninstall load-export"
zpm "load /tmp/package.tgz"

Also verified that /tmp/package contains a hidden path.modules/load-export-deps/module.xml

@isc-tleavitt Has this worked before in IPM v0.7? It's strange that such a problem has gone unnoticed for so long.

@isc-shuliu
Copy link
Collaborator

@jinlouISC A v0.10.0-beta.12 release artifact is triggered by merging #726 should be generated in a few minutes. Can you try that and verify this bug is fixed?

@jinlouISC
Copy link
Author

@isc-shuliu thank you for letting me know, yes will do and will keep you updated!

@jinlouISC
Copy link
Author

I tested on v0.10.0-beta.12 where IPM was able to locate the dependencies in the tarball. But I ran into another issue where repository 'ipm-temp-dot-modules-1' is not being created, so none of the dependencies were installed because IPM shell would complain "ERROR! Repository 'ipm-temp-dot-modules-1' is unavailable."

@isc-tleavitt isc-tleavitt added the release blocker Blocks the next release label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio: high release blocker Blocks the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants