Unexpected behavior: not all modules are installed
KES777 opened this issue · 4 comments
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.
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?
If you believe cpm has a problem, then please provide a minimal example to demonstrate the problem.
This is a minimal example. But when you install first time - everything is OK. Later it stops to recognize that Exception-Class
has requirements.
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.