Skip Menu |

This queue is for tickets about the File-HomeDir CPAN distribution.

Report information
The Basics
Id: 59514
Status: resolved
Priority: 0/
Queue: File-HomeDir

People
Owner: Nobody in particular
Requestors: jgoulah [...] cpan.org
Cc: jhelwig [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.91
Fixed in: (no value)



Subject: installation is failing
$ cpan File::HomeDir CPAN: Storable loaded ok (v2.18) Going to read /home/testuser/.cpan/Metadata Database was generated on Sun, 18 Jul 2010 17:26:59 GMT Running install for module 'File::HomeDir' CPAN: Data::Dumper loaded ok (v2.121_14) 'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/home/testuser/.cpan/prefs' Running make for A/AD/ADAMK/File-HomeDir-0.91.tar.gz CPAN: Digest::SHA loaded ok (v5.45) CPAN: Compress::Zlib loaded ok (v2.027) Checksum for /home/testuser/.cpan/sources/authors/id/A/AD/ADAMK/File-HomeDir- 0.91.tar.gz ok File-HomeDir-0.91/ File-HomeDir-0.91/README File-HomeDir-0.91/Makefile.PL File-HomeDir-0.91/LICENSE File-HomeDir-0.91/xt/ File-HomeDir-0.91/xt/pmv.t File-HomeDir-0.91/xt/meta.t File-HomeDir-0.91/xt/pod.t File-HomeDir-0.91/t/ File-HomeDir-0.91/t/10_test.t File-HomeDir-0.91/t/02_main.t File-HomeDir-0.91/t/12_darwin_carbon.t File-HomeDir-0.91/t/11_darwin.t File-HomeDir-0.91/t/13_darwin_cocoa.t File-HomeDir-0.91/t/01_compile.t File-HomeDir-0.91/META.yml File-HomeDir-0.91/MANIFEST File-HomeDir-0.91/Changes File-HomeDir-0.91/inc/ File-HomeDir-0.91/inc/Module/ File-HomeDir-0.91/inc/Module/Install/ File-HomeDir-0.91/inc/Module/Install/Can.pm File-HomeDir-0.91/inc/Module/Install/Base.pm File-HomeDir-0.91/inc/Module/Install/Fetch.pm File-HomeDir-0.91/inc/Module/Install/Win32.pm File-HomeDir-0.91/inc/Module/Install/WriteAll.pm File-HomeDir-0.91/inc/Module/Install/Metadata.pm File-HomeDir-0.91/inc/Module/Install/Makefile.pm File-HomeDir-0.91/inc/Module/Install.pm File-HomeDir-0.91/lib/ File-HomeDir-0.91/lib/File/ File-HomeDir-0.91/lib/File/HomeDir.pm File-HomeDir-0.91/lib/File/HomeDir/ File-HomeDir-0.91/lib/File/HomeDir/FreeDesktop.pm File-HomeDir-0.91/lib/File/HomeDir/Unix.pm File-HomeDir-0.91/lib/File/HomeDir/MacOS9.pm File-HomeDir-0.91/lib/File/HomeDir/Driver.pm File-HomeDir-0.91/lib/File/HomeDir/Darwin.pm File-HomeDir-0.91/lib/File/HomeDir/Windows.pm File-HomeDir-0.91/lib/File/HomeDir/Test.pm File-HomeDir-0.91/lib/File/HomeDir/Darwin/ File-HomeDir-0.91/lib/File/HomeDir/Darwin/Carbon.pm File-HomeDir-0.91/lib/File/HomeDir/Darwin/Cocoa.pm CPAN: File::Temp loaded ok (v0.22) Warning (usually harmless): 'YAML' not installed, will not store persistent state CPAN.pm: Going to build A/AD/ADAMK/File-HomeDir-0.91.tar.gz Checking if your kit is complete... Looks good Writing Makefile for File::HomeDir Could not read '/home/testuser/.cpan/build/File-HomeDir-0.91-NJAbuT/META.yml'. Falling back to other methods to determine prerequisites cp lib/File/HomeDir/Darwin.pm blib/lib/File/HomeDir/Darwin.pm cp lib/File/HomeDir/Darwin/Cocoa.pm blib/lib/File/HomeDir/Darwin/Cocoa.pm cp lib/File/HomeDir/Test.pm blib/lib/File/HomeDir/Test.pm cp lib/File/HomeDir/MacOS9.pm blib/lib/File/HomeDir/MacOS9.pm cp lib/File/HomeDir/Driver.pm blib/lib/File/HomeDir/Driver.pm cp lib/File/HomeDir/Windows.pm blib/lib/File/HomeDir/Windows.pm cp lib/File/HomeDir.pm blib/lib/File/HomeDir.pm cp lib/File/HomeDir/Unix.pm blib/lib/File/HomeDir/Unix.pm cp lib/File/HomeDir/FreeDesktop.pm blib/lib/File/HomeDir/FreeDesktop.pm cp lib/File/HomeDir/Darwin/Carbon.pm blib/lib/File/HomeDir/Darwin/Carbon.pm Manifying blib/man3/File::HomeDir::Darwin::Cocoa.3pm Manifying blib/man3/File::HomeDir::Darwin.3pm Manifying blib/man3/File::HomeDir::Test.3pm Manifying blib/man3/File::HomeDir.3pm Manifying blib/man3/File::HomeDir::Unix.3pm Manifying blib/man3/File::HomeDir::FreeDesktop.3pm Manifying blib/man3/File::HomeDir::Darwin::Carbon.3pm Manifying blib/man3/File::HomeDir::Windows.3pm ADAMK/File-HomeDir-0.91.tar.gz /usr/bin/make -- OK Warning (usually harmless): 'YAML' not installed, will not store persistent state Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/01_compile.t ........ ok t/02_main.t ........... 1/51 # Failed test 'Our desktop directory exists' # at t/02_main.t line 289. # Failed test 'Our desktop directory exists' # at t/02_main.t line 290. # Failed test 'Found our local data directory' # at t/02_main.t line 299. # Failed test 'Found our local data directory' # at t/02_main.t line 300. # Looks like you failed 4 tests of 51. t/02_main.t ........... Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/51 subtests t/10_test.t ........... ok t/11_darwin.t ......... skipped: Not running on Darwin t/12_darwin_carbon.t .. skipped: Not running on 32-bit Darwin t/13_darwin_cocoa.t ... skipped: Not running on Darwin with Cocoa API using Mac::SystemDirectory Test Summary Report ------------------- t/02_main.t (Wstat: 1024 Tests: 51 Failed: 4) Failed tests: 44-45, 47-48 Non-zero exit status: 4 Files=6, Tests=92, 0 wallclock secs ( 0.06 usr 0.00 sys + 0.28 cusr 0.06 csys = 0.40 CPU) Result: FAIL Failed 1/6 test programs. 4/92 subtests failed. make: *** [test_dynamic] Error 255 ADAMK/File-HomeDir-0.91.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports ADAMK/File-HomeDir-0.91.tar.gz Warning (usually harmless): 'YAML' not installed, will not store persistent state Running make install make test had returned bad status, won't install without force
by the way this fails because it appears to assume "traditional unix" has a Desktop directory which isn't always the case... especially servers with no GUI
From: dcarrera [...] gmail.com
It also assumes the following directories: $HOME/Music $HOME/Pictures $HOME/Videos And who knows what else. I didn't have any of those directories, and it complained about all of those. When I added them, the install proceeded normally.
I'm seeing the same thing. As is, this test will be a big a problem. This test is faulty. specifically, I'm failing to load: not ok 44 - Our desktop directory exists not ok 45 - Our desktop directory exists For me this is because I was running this under `sudo su`, which changes the $ENV{HOME}, observe: $ sudo su # echo $HOME /root # exit $ sudo echo $HOME /home/ecarroll So, for me if I ran `sudo cpanp install File::HomeDir` it would work, but not `sudo su; cpanp install File::HomeDir`. This is kind of confusing. This can be patched if you simply check to make sure the SUDO_USER is not different from the running user, if it is different then we probably shouldn't assume the running user has a home directory. I imagine 99.9% of `sudo` cases are to `su`. Here is a patch for t/02_main.t:93 : } else { # Default to traditional Unix $HAVEHOME = 1; if ( $ENV{SUDO_USER} != [getpwuid($<)]->[0] ) { $HAVEDESKTOP = 1; $HAVEMUSIC = 1; $HAVEVIDEOS = 1; $HAVEOTHERS = 1; } } -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
I think the last of these assumptions are gone now, reopen if issue persists past 0.96_02