Bug 551974

Summary: Setting publican.cgf tmp_dir causes errors/warnings
Product: [Community] Publican Reporter: Mark Wielaard <mjw>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 1.6CC: jfearn, mmcallis, nb, publican-list, r.landmann
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 1.4-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-31 20:14:35 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mark Wielaard 2010-01-03 07:51:35 EST
Description of problem:

Using a publican.cfg file with tmp_dir: set to something different from 'tmp' causes errors/warnings.

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


How reproducible:

Always, when tmp_dir: set in publican.cfg to something different from 'tmp'.

Steps to Reproduce:
1. Setup a publican directory
2. Add a publican.cfg file with "tmp_dir: build" in it
3. publican build [...]
Actual results:

	Processing file build/en-US/xml_tmp/Using_SystemTap.xml
Can't stat tmp: No such file or directory
 at /usr/lib/perl5/vendor_perl/5.10.0/Publican/Builder.pm line 414
Beginning work on en-US

Expected results:

No warnings/errors.

Additional info:

The problem is in the function setup_xml in Builder.pm which calls finddepth with the hardcoded string 'tmp' instead of $self->{publican}->param('tmp_dir') (aka my $tmp_dir).

The following fixes the issue

Index: publican/lib/Publican/Builder.pm
--- publican/lib/Publican/Builder.pm	(revision 958)
+++ publican/lib/Publican/Builder.pm	(working copy)
@@ -411,7 +411,7 @@
                     { file => $xml_file, out_file => $out_file } );
-        finddepth( \&del_unwanted_dirs, 'tmp' );
+        finddepth( \&del_unwanted_dirs, $tmp_dir );
Comment 1 Jeff Fearn 2010-01-18 17:21:45 EST
Fixed finddepth call using hard coded temp path.

Fixed get_all_langs function using hard coded temp path.
Comment 2 Fedora Update System 2010-01-28 21:05:11 EST
publican-1.4-1.fc12 has been submitted as an update for Fedora 12.
Comment 3 Fedora Update System 2010-01-28 21:06:29 EST
publican-1.4-1.fc11 has been submitted as an update for Fedora 11.
Comment 4 Fedora Update System 2010-01-31 20:13:17 EST
publican-1.4-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2010-01-31 20:21:39 EST
publican-1.4-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.