Warum scheitert cpanm bei Distributionen ohne geeignete Makefiles, wenn cpan -i erfolgreich ist?

784
Chris Betti

Ich bin auf Strawberry Perl unter Windows 7 64-Bit. cpanm fällt bei vielen Paketen in cpan folgendermaßen aus:

$ cpanm Getopt::Long::Descriptive Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz ... OK Configuring Getopt-Long-Descriptive-0.097 ... N/A ! The distribution doesn't have a proper Makefile.PL/Build.PL See C:\Users\me\.cpanm\work\1399608810.1056\build.log for details. 

Gelingt jedoch cpan -i Getopt::Long::Descriptive. Irgendeine Idee warum?


EDIT (Ausgabe von build.log)

cpanm (App::cpanminus) 1.7001 on perl 5.018002 built for MSWin32-x64-multi-thread Work directory is C:\Users\me/.cpanm/work/1399608810.1056 You have make C:\strawberry\c\bin\dmake.exe You have LWP 6.05 You have C:\dev\tools\UnxUtils\usr\local\wbin\tar.exe, C:\dev\tools\UnxUtils\usr\local\wbin\gzip.exe and C:\dev\tools\UnxUtils\usr\local\wbin\bzip2.exe You have C:\dev\tools\UnxUtils\usr\local\wbin\unzip.exe Searching Getopt::Long::Descriptive on cpanmetadb ... --> Working on Getopt::Long::Descriptive Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz -> OK Unpacking Getopt-Long-Descriptive-0.097.tar.gz Entering Getopt-Long-Descriptive-0.097 META.yml/json not found. Creating skeleton for it. Configuring Getopt-Long-Descriptive-0.097 -> N/A -> FAIL The distribution doesn't have a proper Makefile.PL/Build.PL See C:\Users\me\.cpanm\work\1399608810.1056\build.log for details. 

BEARBEITEN (Problem beim Auspacken)

Es scheint faszinierend, dass die Dateien entpackt sind, aber niemals auf der Festplatte erscheinen!

C:\Users\me>cpanm -v --look Getopt::Long::Descriptive cpanm (App::cpanminus) 1.5018 on perl 5.016002 built for MSWin32-x64-multi-thread Work directory is C:\Users\me/.cpanm/work/1399909160.7264 You have make C:\strawberry\c\bin\dmake.exe You have LWP 6.04 You have C:\UnxUtils\usr\local\wbin\tar.exe, C:\UnxUtils\usr\local\wbin\gzip.exe and C:\UnxUtils\usr\local\wbin\bzip2.exe You have C:\UnxUtils\usr\local\wbin\unzip.exe Searching Getopt::Long::Descriptive on cpanmetadb ... --> Working on Getopt::Long::Descriptive Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Getopt-Long-Descriptive-0.097.tar.gz ... OK Unpacking Getopt-Long-Descriptive-0.097.tar.gz Getopt-Long-Descriptive-0.097 README Changes LICENSE dist.ini META.yml MANIFEST META.json Makefile.PL t descriptive.t shortcircuit.t release pod-syntax.t 000-report-versions-tiny.t Long Descriptive.pm changes_has_content.t Descriptive Opts.pm Usage.pm Entering Getopt-Long-Descriptive-0.097 Entering C:/Users/me/.cpanm/work/1399909160.7264/Getopt-Long-Descriptive-0.097 with C:\Windows\system32\cmd.exe Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.  C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097>dir Volume in drive C is OS Volume Serial Number is 008E-DBB0  Directory of C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097  05/12/2014 11:39 AM <DIR> . 05/12/2014 11:39 AM <DIR> .. 0 File(s) 0 bytes 2 Dir(s) 48,360,112,128 bytes free 

BEARBEITEN (gefundene Dateien, eine Ebene höher)

C:\Users\me\.cpanm\work\1399909160.7264\Getopt-Long-Descriptive-0.097>cd ..  C:\Users\me\.cpanm\work\1399909160.7264>ls 000-report-versions-tiny.t Makefile.PL Changes Opts.pm Descriptive README Descriptive.pm Usage.pm Getopt-Long-Descriptive-0.097 changes_has_content.t Getopt-Long-Descriptive-0.097.tar.gz descriptive.t LICENSE dist.ini Long pod-syntax.t MANIFEST release META.json shortcircuit.t META.yml t 
1
Das ist seltsam, weil Getopt :: Long :: Descriptive Version 0.097 _does_ ein [Makefile.PL] (https://metacpan.org/source/RJBS/Getopt-Long-Descriptive-0.097/Makefile.PL) enthält. Können Sie das Buildprotokoll überprüfen, auf das die Fehlernachricht verweist? Edward vor 10 Jahren 0
Ich habe die build.log-Informationen hinzugefügt. Hinweis: Das Verzeichnis "Getopt-Long-Descriptive-0.097" in ".cpanm \ work \ 1399608810.1056" ist leer. Ich gehe davon aus, dass cpanm den Inhalt nach einer fehlgeschlagenen Installation gelöscht hat. Die anderen Pakete, die ich mit diesem Lauf installiert habe, haben keine leeren Verzeichnisse. Chris Betti vor 10 Jahren 0
`Build.log` ist also auch nicht sehr hilfreich ... Es scheint, als sei beim Auspacken des Dist etwas schief gelaufen. Wussten Sie, dass Sie `cpanm --look Getopt :: Long :: Descriptive` ausführen können, damit cpanm den Dist für Sie auspackt? Es wechselt in das Verzeichnis, in dem der Dist entpackt wurde, sodass Sie `perl Makefile.PL`,` make` und all das manuell ausführen können. Edward vor 10 Jahren 0
Zur Ausgabe von --look: Wenn ich wget, gunzip und tar von Hand ausführe, werden die Dateien problemlos entpackt. Chris Betti vor 10 Jahren 0
Ich durchsuchte meine Festplatte und fand die Dateien. Sie wurden nicht in das von cpanm erwartete Unterverzeichnis entpackt. Stattdessen wurden sie in das Verzeichnis oben entpackt. Ich frage mich, ob dies eine cpan-Anforderung ist, die das Paket fehlt, oder ob cpanm beim Erkennen von Dateien im Stammverzeichnis des Archivs ein wenig besser sein könnte. Chris Betti vor 10 Jahren 0
Ich denke, hier passiert etwas anderes ... Getopt :: Long :: Descriptive hat eine genau definierte [Verzeichnisstruktur] (https://metacpan.org/source/RJBS/Getopt-Long-Descriptive-0.097), aber auf Ihrem maschinell wird der Inhalt des Archivs zu einer flachen Liste zusammengedrückt. Nun kann ich nicht sagen, ob es sich bei Cpanm um einen Fehler oder um Teer handelt, aber das sieht nach einem Fehler aus. Edward vor 10 Jahren 0

1 Antwort auf die Frage

0
Chris Betti

Es stellte sich heraus, dass UnxUtils tar in diesem Fall fehlerhaft war. Ich bin nicht sicher, wie das Getopt::Long::DescriptiveArchiv erstellt wurde, aber UnxUtils tar verringert den Inhalt, wenn es entpackt wird.

Auf der anderen Seite kann GnuWin32 tar das Archiv gut handhaben.