cpm icon indicating copy to clipboard operation
cpm copied to clipboard

Install of tarball without META files fails, but succeeds if module name is provided

Open oalders opened this issue 3 years ago • 0 comments
trafficstars

The following fails:

#!/bin/bash

set -eux -o pipefail

orepan2-inject https://cpan.metacpan.org/authors/id/G/GC/GCAMPBELL/Data-Diff-0.01.tar.gz darkpan

pkgs="file://$(pwd)/darkpan/modules/02packages.details.txt.gz"
darkpan="file://$(pwd)/darkpan/"
local=foo

rm -rf $local
cpm install \
    --resolver "02packages,$pkgs,$darkpan" \
    -L "$local" \
    --show-build-log-on-failure \
    darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz

Output is:

++ pwd
+ pkgs=file:///Users/olaf/Documents/scratch/darkpan/modules/02packages.details.txt.gz
++ pwd
+ darkpan=file:///Users/olaf/Documents/scratch/darkpan/
+ local=foo
+ rm -rf foo
+ cpm install --resolver 02packages,file:///Users/olaf/Documents/scratch/darkpan/modules/02packages.details.txt.gz,file:///Users/olaf/Documents/scratch/darkpan/ -L foo --show-build-log-on-failure darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz
FAIL install Data-Diff-0.01
0 distribution installed.
2022-11-22T12:16:41,70211| Running cpm 0.997011 (/Users/olaf/.plenv/versions/5.36.0/bin/cpm) on perl 5.36.0 built for darwin-2level (/Users/olaf/.plenv/versions/5.36.0/bin/perl5.36.0)
2022-11-22T12:16:41,70211| Command line arguments are: install --resolver 02packages,file:///Users/olaf/Documents/scratch/darkpan/modules/02packages.details.txt.gz,file:///Users/olaf/Documents/scratch/darkpan/ -L foo --show-build-log-on-failure darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz
2022-11-22T12:16:41,70211| Work directory is /Users/olaf/.perl-cpm/work/1669137401.70211
2022-11-22T12:16:41,70211| You have make /usr/bin/make
2022-11-22T12:16:41,70211| You have HTTP::Tiny 0.080
2022-11-22T12:16:41,70211| You have tar /usr/bin/tar (bsd)
2022-11-22T12:16:41,70211| You have unzip /usr/bin/unzip
2022-11-22T12:16:41,70211| Setup local::lib /Users/olaf/Documents/scratch/foo
2022-11-22T12:16:41,70211| --
2022-11-22T12:16:41,70211| Summary of my perl5 (revision 5 version 36 subversion 0) configuration:
2022-11-22T12:16:41,70211|    
2022-11-22T12:16:41,70211|   Platform:
2022-11-22T12:16:41,70211|     osname=darwin
2022-11-22T12:16:41,70211|     osvers=21.6.0
2022-11-22T12:16:41,70211|     archname=darwin-2level
2022-11-22T12:16:41,70211|     uname='darwin olafs-imac.lan 21.6.0 darwin kernel version 21.6.0: wed aug 10 14:28:35 pdt 2022; root:xnu-8020.141.5~2release_arm64_t8101 arm64 '
2022-11-22T12:16:41,70211|     config_args='-Dprefix=/Users/olaf/.plenv/versions/5.36.0 -de -Dversiononly -A'eval:scriptdir=/Users/olaf/.plenv/versions/5.36.0/bin''
2022-11-22T12:16:41,70211|     hint=recommended
2022-11-22T12:16:41,70211|     useposix=true
2022-11-22T12:16:41,70211|     d_sigaction=define
2022-11-22T12:16:41,70211|     useithreads=undef
2022-11-22T12:16:41,70211|     usemultiplicity=undef
2022-11-22T12:16:41,70211|     use64bitint=define
2022-11-22T12:16:41,70211|     use64bitall=define
2022-11-22T12:16:41,70211|     uselongdouble=undef
2022-11-22T12:16:41,70211|     usemymalloc=n
2022-11-22T12:16:41,70211|     default_inc_excludes_dot=define
2022-11-22T12:16:41,70211|   Compiler:
2022-11-22T12:16:41,70211|     cc='cc'
2022-11-22T12:16:41,70211|     ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=12.5 -fno-strict-aliasing -pipe -fstack-protector-strong -DPERL_USE_SAFE_PUTENV'
2022-11-22T12:16:41,70211|     optimize='-O3'
2022-11-22T12:16:41,70211|     cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=12.5 -fno-strict-aliasing -pipe -fstack-protector-strong'
2022-11-22T12:16:41,70211|     ccversion=''
2022-11-22T12:16:41,70211|     gccversion='Apple LLVM 14.0.0 (clang-1400.0.29.202)'
2022-11-22T12:16:41,70211|     gccosandvers=''
2022-11-22T12:16:41,70211|     intsize=4
2022-11-22T12:16:41,70211|     longsize=8
2022-11-22T12:16:41,70211|     ptrsize=8
2022-11-22T12:16:41,70211|     doublesize=8
2022-11-22T12:16:41,70211|     byteorder=12345678
2022-11-22T12:16:41,70211|     doublekind=3
2022-11-22T12:16:41,70211|     d_longlong=define
2022-11-22T12:16:41,70211|     longlongsize=8
2022-11-22T12:16:41,70211|     d_longdbl=define
2022-11-22T12:16:41,70211|     longdblsize=8
2022-11-22T12:16:41,70211|     longdblkind=0
2022-11-22T12:16:41,70211|     ivtype='long'
2022-11-22T12:16:41,70211|     ivsize=8
2022-11-22T12:16:41,70211|     nvtype='double'
2022-11-22T12:16:41,70211|     nvsize=8
2022-11-22T12:16:41,70211|     Off_t='off_t'
2022-11-22T12:16:41,70211|     lseeksize=8
2022-11-22T12:16:41,70211|     alignbytes=8
2022-11-22T12:16:41,70211|     prototype=define
2022-11-22T12:16:41,70211|   Linker and Libraries:
2022-11-22T12:16:41,70211|     ld='cc'
2022-11-22T12:16:41,70211|     ldflags =' -mmacosx-version-min=12.5 -fstack-protector-strong'
2022-11-22T12:16:41,70211|     libpth=/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/lib /Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/lib /Library/Developer/CommandLineTools/usr/lib /usr/lib
2022-11-22T12:16:41,70211|     libs= 
2022-11-22T12:16:41,70211|     perllibs=
2022-11-22T12:16:41,70211|     libc=
2022-11-22T12:16:41,70211|     so=dylib
2022-11-22T12:16:41,70211|     useshrplib=false
2022-11-22T12:16:41,70211|     libperl=libperl.a
2022-11-22T12:16:41,70211|     gnulibc_version=''
2022-11-22T12:16:41,70211|   Dynamic Linking:
2022-11-22T12:16:41,70211|     dlsrc=dl_dlopen.xs
2022-11-22T12:16:41,70211|     dlext=bundle
2022-11-22T12:16:41,70211|     d_dlsymun=undef
2022-11-22T12:16:41,70211|     ccdlflags=' '
2022-11-22T12:16:41,70211|     cccdlflags=' '
2022-11-22T12:16:41,70211|     lddlflags=' -mmacosx-version-min=12.5 -bundle -undefined dynamic_lookup -fstack-protector-strong'
2022-11-22T12:16:41,70211| Characteristics of this binary (from libperl): 
2022-11-22T12:16:41,70211|   Compile-time options:
2022-11-22T12:16:41,70211|     HAS_TIMES
2022-11-22T12:16:41,70211|     PERLIO_LAYERS
2022-11-22T12:16:41,70211|     PERL_COPY_ON_WRITE
2022-11-22T12:16:41,70211|     PERL_DONT_CREATE_GVSV
2022-11-22T12:16:41,70211|     PERL_MALLOC_WRAP
2022-11-22T12:16:41,70211|     PERL_OP_PARENT
2022-11-22T12:16:41,70211|     PERL_PRESERVE_IVUV
2022-11-22T12:16:41,70211|     PERL_USE_SAFE_PUTENV
2022-11-22T12:16:41,70211|     USE_64_BIT_ALL
2022-11-22T12:16:41,70211|     USE_64_BIT_INT
2022-11-22T12:16:41,70211|     USE_LARGE_FILES
2022-11-22T12:16:41,70211|     USE_LOCALE
2022-11-22T12:16:41,70211|     USE_LOCALE_COLLATE
2022-11-22T12:16:41,70211|     USE_LOCALE_CTYPE
2022-11-22T12:16:41,70211|     USE_LOCALE_NUMERIC
2022-11-22T12:16:41,70211|     USE_LOCALE_TIME
2022-11-22T12:16:41,70211|     USE_PERLIO
2022-11-22T12:16:41,70211|     USE_PERL_ATOF
2022-11-22T12:16:41,70211|   Built under darwin
2022-11-22T12:16:41,70211|   Compiled at Nov 10 2022 18:09:40
2022-11-22T12:16:41,70211|   %ENV:
2022-11-22T12:16:41,70211|     PERL5LIB="/Users/olaf/Documents/scratch/foo/lib/perl5"
2022-11-22T12:16:41,70211|     PERL_LOCAL_LIB_ROOT="/Users/olaf/Documents/scratch/foo"
2022-11-22T12:16:41,70211|     PERL_MB_OPT="--install_base "/Users/olaf/Documents/scratch/foo""
2022-11-22T12:16:41,70211|     PERL_MM_OPT="INSTALL_BASE=/Users/olaf/Documents/scratch/foo"
2022-11-22T12:16:41,70211|   @INC:
2022-11-22T12:16:41,70211|     /Users/olaf/Documents/scratch/foo/lib/perl5/5.36.0/darwin-2level
2022-11-22T12:16:41,70211|     /Users/olaf/Documents/scratch/foo/lib/perl5/5.36.0
2022-11-22T12:16:41,70211|     /Users/olaf/Documents/scratch/foo/lib/perl5/darwin-2level
2022-11-22T12:16:41,70211|     /Users/olaf/Documents/scratch/foo/lib/perl5
2022-11-22T12:16:41,70211|     /Users/olaf/.plenv/versions/5.36.0/lib/perl5/site_perl/5.36.0/darwin-2level
2022-11-22T12:16:41,70211|     /Users/olaf/.plenv/versions/5.36.0/lib/perl5/site_perl/5.36.0
2022-11-22T12:16:41,70211|     /Users/olaf/.plenv/versions/5.36.0/lib/perl5/5.36.0/darwin-2level
2022-11-22T12:16:41,70211|     /Users/olaf/.plenv/versions/5.36.0/lib/perl5/5.36.0
2022-11-22T12:16:41,70211| --
2022-11-22T12:16:41,70229,file:///Users/olaf/Documents/scratch/darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz| Copying file:///Users/olaf/Documents/scratch/darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz
2022-11-22T12:16:41,70229,file:///Users/olaf/Documents/scratch/darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz| Unpacking Data-Diff-0.01.tar.gz
2022-11-22T12:16:41,70229,file:///Users/olaf/Documents/scratch/darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz| Distribution does not have META.json nor META.yml
2022-11-22T12:16:41,70229,file:///Users/olaf/Documents/scratch/darkpan/authors/id/D/DU/DUMMY/Data-Diff-0.01.tar.gz| Failed to fetch/configure distribution
2022-11-22T12:16:41,70211| --
2022-11-22T12:16:41,70211| Installation failed. The direct cause of the failure comes from the following packages/distributions; you may want to grep this log file by them:
2022-11-22T12:16:41,70211|  * Data-Diff-0.01

However, if I replace the path to the tarball with Data::Diff, then the installation succeeds. Is this expected?

oalders avatar Nov 22 '22 17:11 oalders