Bug 551974 - Setting publican.cgf tmp_dir causes errors/warnings
Summary: Setting publican.cgf tmp_dir causes errors/warnings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-03 12:51 UTC by Mark Wielaard
Modified: 2010-11-24 04:18 UTC (History)
5 users (show)

Fixed In Version: 1.4-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-01 01:14:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2010-01-03 12:51:35 UTC
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):

publican-1.3-0.fc12.noarch

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 );
     }
 
     return;

Comment 1 Jeff Fearn 🐞 2010-01-18 22:21:45 UTC
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-29 02:05:11 UTC
publican-1.4-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.4-1.fc12

Comment 3 Fedora Update System 2010-01-29 02:06:29 UTC
publican-1.4-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/publican-1.4-1.fc11

Comment 4 Fedora Update System 2010-02-01 01:13:17 UTC
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-02-01 01:21:39 UTC
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.


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