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

Module::Manifest::Skip fails as a dependency in some environments #1

robrwo opened this Issue Oct 26, 2018 · 1 comment


None yet
2 participants

robrwo commented Oct 26, 2018

Module::Manifest::Skip is unable to find it's default MANIFEST.SKIP file in some environments. It's not clear if this is an issue with File::ShareDir or Module::Manifest::Skip.

@robrwo robrwo added the help wanted label Oct 26, 2018


This comment has been minimized.

eserte commented Oct 26, 2018

The failure can be reproduced with the following Dockerfile:

# docker build -t perl-test . && docker run perl-test
FROM debian:stretch
RUN echo "cache invalidation #20181026"
RUN apt-get -y update
RUN apt-get -y install perl-modules
RUN apt-get -y install make

# Speed up installation
RUN apt-get -y --no-install-recommends install libdist-zilla-perl libmoose-perl libmoosex-mungehas-perl libmodule-build-perl libtype-tiny-xs-perl libtest-warnings-perl libtest-leaktrace-perl libhash-fieldhash-perl build-essential
RUN perl -MCPAN -e 'CPAN::Index->reload'
RUN perl -i -pe 's{.*index_expire.*}{index_expire=>1,}' /root/.cpan/CPAN/

RUN cpan Module::Manifest::Skip
# Must be installed in /usr/local/lib for the failure, not in /usr/local/share/perl or so
RUN mkdir -p /usr/local/lib/site_perl/Module/Manifest
RUN mv /usr/local/share/perl/5.24.1/Module/Manifest/ /usr/local/lib/site_perl/Module/Manifest/
# The actual failure happens because next to /usr/local/lib exists a "share" directory

CMD cpan -t RRWO/Dist-Zilla-Plugin-Generate-ManifestSkip-v0.1.3.tar.gz

The problem seems to be caused by this line in Module::Manifest::Skip (@ingy FYI)

77:         elsif ($path =~ s!(\S.*?)[\\/]?\blib\b.*!$1! and -e "$path/share") {

If Module::Manifest::Skip is installed in a path which has a "lib" component, and if there's a "share" directory next to it, then this share directory will be used. This is often the wrong directory. For example, in my installations the Module::Manifest::Skip path looks like /usr/perl5.24.1p/lib/site_perl/5.24.1/Module/Manifest/ So if there's a /usr/perl5.24.1p/share directory (which is created by some CPAN distributions, e.g. spamassassin), then things fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment