Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #10873 pear channel-discover broken - pear temp directories not writeable
Submitted: 2007-04-28 13:25 UTC
From: saltybeagle Assigned: cellog
Status: Closed Package: PEAR (version CVS)
PHP Version: 5.2.1 OS: n/a
Roadmaps: 1.5.4    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 2 - 1 = ?

 
 [2007-04-28 13:25 UTC] saltybeagle (Brett Bieber)
Description: ------------ pear channel-discover appears to be broken in 1.5.3 and CVS because the temp directory is never created. Touch a remote package .xml or use -f to force channel discover to reproduce. I've found two commands which appear to be affected: pear channel-discover pear channel-update If you add in $contents->getMessage() the error is "could not open /tmp/pear/temp/channel.xml for writing" pear config-get temp_dir is /tmp/pear/temp ls /tmp/pear only shows the cache directory. Test script: --------------- pear channel-update -f pear.php.net Expected result: ---------------- channel updated successfully Actual result: -------------- Cannot retrieve channel.xml

Comments

 [2007-04-28 14:25 UTC] tias (Tias Guns)
Since version 1.5.3 in Command/Channels.php the config temp_dir is used, in stead of creating a new temp_dir each time. For older installtions this directory seems not yet to exist. I'm not sure where this should be fixed: when using that dir, in the registry or on installation of PEAR ? Perhaps this is a good occasion to think about Request #10626 too (checking directories)
 [2007-04-28 17:57 UTC] cellog (Greg Beaver)
pear config-set temp_dir to a location that you can write to, and the problem goes away. I do think we need to fix the error message to tell the user to set temp_dir to a writeable location
 [2007-04-29 01:39 UTC] toggg (bertrand Gugger)
See also bug #10847 So far I never created /tmp/pear and /tmp/pear/cache ... so, as a "noob user", I wonder why I need to create manually /tmp/pear/temp/ As it is the default config value and it is situated in the same branch as download_dir (default), why would not pear simply create this directory ?
 [2007-04-29 18:42 UTC] tias (Tias Guns)
I agree with bertrand, the dir should be created by PEAR, the question is just: when. I think the download dir and cache dir are created on usage, so by the 'client' of the registry. If somebody knows a more 'transparant' way then I'm all ears : )
 [2007-04-30 13:18 UTC] yunosh (Jan Schneider)
The attached patches improves error reporting, so that users actually see what and why something fails.
 [2007-05-06 10:46 UTC] doconnor (Daniel O'Connor)
Same as previous patch, however explicitly does file_exists/is_writable checks and provides users with how-to-fix it instructions
 [2007-05-06 23:32 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.