This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 551974 - Setting publican.cgf tmp_dir causes errors/warnings
Setting publican.cgf tmp_dir causes errors/warnings
Status: CLOSED ERRATA
Product: Publican
Classification: Community
Component: publican (Show other bugs)
1.6
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeff Fearn
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-03 07:51 EST by Mark Wielaard
Modified: 2010-11-23 23:18 EST (History)
5 users (show)

See Also:
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:


Attachments (Terms of Use)

  None (edit)
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):

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 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.
http://admin.fedoraproject.org/updates/publican-1.4-1.fc12
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.
http://admin.fedoraproject.org/updates/publican-1.4-1.fc11
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.

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