Bug 736189 - Publican should die with a useful message if directory creation fails
Summary: Publican should die with a useful message if directory creation fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.0
Assignee: Jeff Fearn 🐞
QA Contact: Ruediger Landmann
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-06 23:05 UTC by Jeff Fearn 🐞
Modified: 2012-10-31 03:11 UTC (History)
3 users (show)

Fixed In Version: 3.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-31 03:11:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Fearn 🐞 2011-09-06 23:05:50 UTC
Description of problem:
Every time Publican creates a directory it should check for success and croak with a useful message if it fails.

Version-Release number of selected component (if applicable):
publican-2.7

How reproducible:
Easy

Steps to Reproduce:
1. cd to a book as a normal user
2. create tmp dir
3. chown root:root tmp
4: run publican build
  
Actual results:
Weird errors

Expected results:
"Can't create directory $dir $why"

Additional info:

Comment 1 Jeff Fearn 🐞 2012-03-12 04:40:51 UTC
This should be fixed in master branch due to moving from system call to mkpath. mkpath delivers a useful message when it fails.

$cd foo
$ mkdir tmp
$ sudo chown  root:root tmp
$ publican build --langs all --formats xml

DEBUG: Publican: config loaded
Setting up ar-SA
mkdir tmp/ar-SA: Permission denied at /usr/share/perl5/vendor_perl/Publican/Builder.pm line 331

Comment 2 Dayle Parker 2012-04-26 06:54:47 UTC
Fix verified on Fedora 16 with Publican 3.0-0.fc16.t166. The same message is generated:


$ publican build --langs all --formats xml

Setting up en-US
mkdir tmp/en-US: Permission denied at /usr/share/perl5/vendor_perl/Publican/Builder.pm line 345


Note You need to log in before you can comment on or make changes to this bug.