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

Unexpected behavior: not all modules are installed #232

Open
KES777 opened this issue Dec 24, 2022 · 4 comments
Open

Unexpected behavior: not all modules are installed #232

KES777 opened this issue Dec 24, 2022 · 4 comments

Comments

@KES777
Copy link

KES777 commented Dec 24, 2022

I use cpm to install modules into container:

## Modules
WORKDIR ${APP_ROOT}

RUN  cpanm -n -L ./local App::cpm Carton::Snapshot  && rm -rf /root/.cpanm
COPY cpanfile ./
COPY cpanfile.snapshot ./
RUN  \
  --mount=type=cache,target=/root/.perl-cpm   \
  cpm install  -w 16  --no-test  -L ./local   \
  --show-build-log-on-failure                 \
  --snapshot ./cpanfile.snapshot              \
  --cpanfile ./cpanfile

# To generate cpanfile.snapshot
RUN  carton install

Everything goes well until one day I got error message about that module was not found.

I checked my cpanfile.snapshot and saw:

  Exception-Class-1.45
    pathname: D/DR/DROLSKY/Exception-Class-1.45.tar.gz
    provides:
      Exception::Class 1.45
      Exception::Class::Base 1.45
    requirements:

But expected:

 Exception-Class-1.45
   pathname: D/DR/DROLSKY/Exception-Class-1.45.tar.gz
   provides:
     Exception::Class 1.45
     Exception::Class::Base 1.45
   requirements:
     Carp 0
     Class::Data::Inheritable 0.02
     Devel::StackTrace 2.00
     ExtUtils::MakeMaker 0
     Scalar::Util 0
     base 0
     overload 0
     perl 5.008001
     strict 0
     warnings 0

I tried to rerun carton and cpm from inside of container:

# local/bin/carton
Installing modules using /opt/bot/cpanfile
Complete! Modules were installed into /opt/bot/local

# cpm install  -w 16  --no-test  -L ./local     --show-build-log-on-failure                   --snapshot ./cpanfile.snapshot                --cpanfile ./cpanfile
All requirements are satisfied.

cpm does not recognize requirements in some cases.

@skaji
Copy link
Owner

skaji commented Dec 24, 2022

I'm not sure what you mean.

I checked my cpanfile.snapshot and saw:
...
But expected:

Do you mean cpanfile.snapshot should have "requirements" section?
If cpanfile.snapshot is created by carton, then is it an issue for carton?

@skaji
Copy link
Owner

skaji commented Dec 24, 2022

If you believe cpm has a problem, then please provide a minimal example to demonstrate the problem.

@KES777
Copy link
Author

KES777 commented Dec 24, 2022

cpanfile.txt

This is a minimal example. But when you install first time - everything is OK. Later it stops to recognize that Exception-Class has requirements.

@KES777
Copy link
Author

KES777 commented Dec 24, 2022

Do you mean cpanfile.snapshot should have "requirements" section?

Yes, for Exception-Class-1.45 there is no requirement section.

If cpanfile.snapshot is created by carton, then is it an issue for carton?

No, either cpm or carton does not install Class::Data::Inheritable.

Carton I use for debugging purpose here: to see which dependencies were detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants