Skip to content
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

[BUG] CPAN initial configuration #5953

Closed
p5pRT opened this issue Sep 22, 2002 · 13 comments
Closed

[BUG] CPAN initial configuration #5953

p5pRT opened this issue Sep 22, 2002 · 13 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 22, 2002

Migrated from rt.perl.org#17487 (status was 'resolved')

Searchable as RT17487$

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2002

From paul_roebuck@mac.com

It took quite some time for me to figure out exactly what and
how to fix this. Figured I'd mention it in case someone else
runs into the same problem.

Initially, I thought it was a problem with out-of-date software
as much of the raw MacOS X install used versions many years out
of date. But later it dawned on me what the issue was.

During initial CPAN configuration, you are asked to select
several URLs for 'urllist'. The problem is that installation
of anything will fail if no FTP sites are chosen. When I did
my initial configuration, I just chose a couple near the end
of the list (53, 49, 47). Only thing is that 'ncftp' wants
FTP sites, not HTTP sites. And it took me a while to figure
out what I had to delete in order to get prompted for the
urllist again; yes, it could be updated with 'o conf urllist'
if you remembered any of the URLs which I couldn't.

Anyway, my suggestion is that the initial setup check that
at least one FTP site was included in 'urllist' since the
installation process will fail otherwise anyway.

--


Out of the 10Base-T, through the router, down the T1, over the
leased line, off the bridge, past the firewall... nothing but Net.

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2004

From @smpeters

[paul_roebuck@​mac.com - Sun Sep 22 03​:01​:33 2002]​:

It took quite some time for me to figure out exactly what and
how to fix this. Figured I'd mention it in case someone else
runs into the same problem.

Initially, I thought it was a problem with out-of-date software
as much of the raw MacOS X install used versions many years out
of date. But later it dawned on me what the issue was.

During initial CPAN configuration, you are asked to select
several URLs for 'urllist'. The problem is that installation
of anything will fail if no FTP sites are chosen. When I did
my initial configuration, I just chose a couple near the end
of the list (53, 49, 47). Only thing is that 'ncftp' wants
FTP sites, not HTTP sites. And it took me a while to figure
out what I had to delete in order to get prompted for the
urllist again; yes, it could be updated with 'o conf urllist'
if you remembered any of the URLs which I couldn't.

Since I own a Mac I understand the pain; however, the problem is related
to the fact that Mac's include neither Lynx or wget in the distribution
and CPAN.pm does not work with curl.

This issue is taken care of by adding an ftp site to your configuration.
This isn't necessarily a bug, but a configuration issue on Mac OS X.

@p5pRT
Copy link
Author

p5pRT commented Sep 6, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 7, 2004

From paul_roebuck@mac.com

On Mon, 06 Sep 2004 04​:09, Steve Peters wrote​:

[paul_roebuck@​mac.com - Sun Sep 22 03​:01​:33 2002]​:

It took quite some time for me to figure out exactly what and
how to fix this. Figured I'd mention it in case someone else
runs into the same problem.

Initially, I thought it was a problem with out-of-date software
as much of the raw MacOS X install used versions many years out
of date. But later it dawned on me what the issue was.

During initial CPAN configuration, you are asked to select
several URLs for 'urllist'. The problem is that installation
of anything will fail if no FTP sites are chosen. When I did
my initial configuration, I just chose a couple near the end
of the list (53, 49, 47). Only thing is that 'ncftp' wants
FTP sites, not HTTP sites. And it took me a while to figure
out what I had to delete in order to get prompted for the
urllist again; yes, it could be updated with 'o conf urllist'
if you remembered any of the URLs which I couldn't.

Since I own a Mac I understand the pain; however, the problem is related
to the fact that Mac's include neither Lynx or wget in the distribution
and CPAN.pm does not work with curl.

This issue is taken care of by adding an ftp site to your configuration.
This isn't necessarily a bug, but a configuration issue on Mac OS X.

I disagree with the final thought there. My machine did have a copy
of wget on it so that wasn't the problem in my case (though it would be
for a stock install of the current version of Mac OS X). Since it does
present a problem for certain configurations, I would recommend requiring
at least one FTP site be chosen. At very least, it could have given a
warning.

--


Out of the 10Base-T, through the router, down the T1, over the
leased line, off the bridge, past the firewall... nothing but Net.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

[paul_roebuck@​mac.com - Tue Sep 07 06​:28​:44 2004]​:
I disagree with the final thought there. My machine did have a copy
of wget on it so that wasn't the problem in my case (though it would be
for a stock install of the current version of Mac OS X). Since it does
present a problem for certain configurations, I would recommend requiring
at least one FTP site be chosen. At very least, it could have given a
warning.

Requiring an FTP site is a coarse solution likely to just lead to a new
set of complaints that CPAN.pm requires an FTP mirror. No, that's not
the way.

You mention that you have wget. CPAN.pm triest wget last after trying
ncftp*. As its the most capable of all the options available it should
be tried first. Then lynx. Then finally ncftp*. A patch for this is
attached.

CPAN.pm could check if the proto is HTTP and not try ncftp* but as they
will be the last thing tried I think its more useful to try them than
not. Who knows, maybe ncftpget will handle http urls in the future?

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

CPAN.pm.patch
--- lib/CPAN.pm	2005/07/12 05:42:34	1.2
+++ lib/CPAN.pm	2005/07/12 06:15:34
@@ -2634,7 +2634,10 @@
 
 	$self->debug("localizing funkyftpwise[$url]") if $CPAN::DEBUG;
 	my($f,$funkyftp);
-	for $f ('lynx','ncftpget','ncftp','wget') {
+
+        # Try the most capable first (wget does HTTP, HTTPS and FTP) and
+        # leave ncftp* for last as it only does FTP.
+	for $f (qw(wget lynx ncftpget ncftp)) {
 	  next unless exists $CPAN::Config->{$f};
 	  $funkyftp = $CPAN::Config->{$f};
 	  next unless defined $funkyftp;
@@ -2725,7 +2728,7 @@
 });
 	  }
           return if $CPAN::Signal;
-	} # lynx,ncftpget,ncftp
+	} # lynx,wget,ncftpget,ncftp
     } # host
 }
 

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

On Mon, Jul 11, 2005 at 11​:19​:06PM -0700, Michael G Schwern via RT wrote​:

CPAN.pm could check if the proto is HTTP and not try ncftp* but as they
will be the last thing tried I think its more useful to try them than
not. Who knows, maybe ncftpget will handle http urls in the future?

Also there's only so much effort I want to put into this as CPANPLUS already
gets it right.

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
  -- Phillip K. Dick

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @rgarcia

On 7/12/05, Michael G Schwern via RT <perlbug-followup@​perl.org> wrote​:

You mention that you have wget. CPAN.pm triest wget last after trying
ncftp*. As its the most capable of all the options available it should
be tried first. Then lynx. Then finally ncftp*. A patch for this is
attached.

Can you include curl in it ? At the beginning or something ? It's
extremely capable and has excellent error reporting.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @smpeters

On Tue, Jul 12, 2005 at 12​:00​:02PM +0200, Rafael Garcia-Suarez wrote​:

On 7/12/05, Michael G Schwern via RT <perlbug-followup@​perl.org> wrote​:

You mention that you have wget. CPAN.pm triest wget last after trying
ncftp*. As its the most capable of all the options available it should
be tried first. Then lynx. Then finally ncftp*. A patch for this is
attached.

Can you include curl in it ? At the beginning or something ? It's
extremely capable and has excellent error reporting.

Since curl is included by default on Mac OS X and wget and lynx is not, I'd
like to see curl a little farther up the list as well.

Steve Peters
steve@​fisharerojo.org

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

On Tue, Jul 12, 2005 at 05​:09​:15AM -0500, Steve Peters wrote​:

On Tue, Jul 12, 2005 at 12​:00​:02PM +0200, Rafael Garcia-Suarez wrote​:

On 7/12/05, Michael G Schwern via RT <perlbug-followup@​perl.org> wrote​:

You mention that you have wget. CPAN.pm triest wget last after trying
ncftp*. As its the most capable of all the options available it should
be tried first. Then lynx. Then finally ncftp*. A patch for this is
attached.

Can you include curl in it ? At the beginning or something ? It's
extremely capable and has excellent error reporting.

Since curl is included by default on Mac OS X and wget and lynx is not, I'd
like to see curl a little farther up the list as well.

Sure, but this involves new code. As the code for handling different
download methods has more spagetti than an Italian resturaunt I'd like to
finish this bug up and tackle curl as a separate bug.

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern
Reality is that which, when you stop believing in it, doesn't go away.
  -- Phillip K. Dick

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @steve-m-hay

Michael G Schwern via RT wrote​:

[paul_roebuck@​mac.com - Tue Sep 07 06​:28​:44 2004]​:
I disagree with the final thought there. My machine did have a copy
of wget on it so that wasn't the problem in my case (though it would be
for a stock install of the current version of Mac OS X). Since it does
present a problem for certain configurations, I would recommend requiring
at least one FTP site be chosen. At very least, it could have given a
warning.

Requiring an FTP site is a coarse solution likely to just lead to a new
set of complaints that CPAN.pm requires an FTP mirror. No, that's not
the way.

You mention that you have wget. CPAN.pm triest wget last after trying
ncftp*. As its the most capable of all the options available it should
be tried first. Then lynx. Then finally ncftp*. A patch for this is
attached.

Thanks. Applied as change 25124.


Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses​: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @steve-m-hay

Now fixed in bleadperl so should be in 5.8.8, otherwise in 5.10.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

@steve-m-hay - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Jul 12, 2005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant