Skip Menu |

This queue is for tickets about the ExtUtils-AutoInstall CPAN distribution.

Report information
The Basics
Id: 6977
Status: new
Priority: 0/
Queue: ExtUtils-AutoInstall

People
Owner: Nobody in particular
Requestors: j7 [...] id.ru
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.59
Fixed in: (no value)



Subject: Misleading message about insufficient permissions in _can_write
When user tries to install some module without write permissions to $Config::Config{sitelib}, he/she could receive a misleading message that $path is not writeable while it is. Attached patch makes the message consistent with the check.
--- AutoInstall.pm.orig Thu Jul 15 22:27:18 2004 +++ AutoInstall.pm Thu Jul 15 22:27:52 2004 @@ -783,7 +783,7 @@ return 1 if -w $path and -w $Config::Config{sitelib}; print << "."; -*** You are not allowed to write to the directory '$path'; +*** You are not allowed to write to the directories '$path' and '$Config::Config{sitelib}'; the installation may fail due to insufficient permissions. .
[guest - Thu Jul 15 14:35:40 2004]: Show quoted text
> When user tries to install some module without write permissions to > $Config::Config{sitelib}, he/she could receive a misleading message > that $path is not writeable while it is. Attached patch makes the > message consistent with the check.
I just encountered this misleading message, too. I further propose that the message, even patched, is dubious. CPANPLUS is capable of using "sudo" for the install process so not being able to write to sitelib at the point which CPANPLUS is run is not necessarily a problem. _can_write() can check to see if CPANPLUS is configured to use sudo and if so not bother checking if sitelib is writable. Further problems with this approach include a CPANPLUS configured to install into a PREFIX in which case not being able to write to sitelib has no relevance. I would simply drop the sitelib check altogether. Checking the writability of the CPANPLUS config/cache directory should be sufficient. If CPANPLUS is normally run as root then the config dir will only be writable by root. If not, then not.