Skip to content

Using perlbrew on Cygwin - a problem with gnu tar unwrapping perl archive files #833

Open
@somian

Description

@somian

Discussed in #832

Originally posted by somian December 16, 2024
I'm having some trouble setting up and using perlbrew on cygwin, and I don't think I am going to be the only one. Unfortunately I don't understand how to use Github and I don't have time to learn it right now. I'll describe the problem and I can offer a patch by uploading it to this message.

The problem occurs where perlbrew acts on a downloaded perl archive, using gnu tar to expand it. Gnu tar must not be used on a filename that is absolute, on cygwin or MSWindows, because it misunderstands the C: as referring to a remote tape drive or similar device. The flag --force-local must be used or tar dies with an error.

So, I have a fix that should not break any other platform. Thank you for your kind attention.

Here's my console error:

-bash-5.2$ perlbrew install perl-5.38.2
Fetching perl 5.38.2 as C:/Users/somia/perl5/perlbrew/dists/perl-5.38.2.tar.gz
Download https://cpan.metacpan.org/authors/id/P/PE/PEVANS/perl-5.38.2.tar.gz to C:/Users/somia/perl5/perlbrew/dists/perl-5.38.2.tar.gz
tar (child): Cannot connect to C: resolve failed

gzip: stdin: unexpected end of file
tar: Child returned status 128
tar: Error is not recoverable: exiting now
Failed to extract C:/Users/somia/perl5/perlbrew/dists/perl-5.38.2.tar.gz at C:/Users/somia/perl5/perlbrew/bin/perlbrew line 1726.

cygwin-gnutar.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions