bugZoneCheck - Bugs: bug #34520, Zonecheck adds its own directories...

 
 

bug #34520: Zonecheck adds its own directories at the wrong place in $LOAD_PATH

Submitter:  Ollivier Robert <keltia>
Submitted:  Mon 10 Oct 2011 02:59:04 PM UTC
   
 
Category:  * config Severity:  High
Priority:  5 - Normal Item Group:  * Crash/Error
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Oct 2011 02:59:04 PM UTC, original submission:  

Zonecheck (in zc/zc.rb) use the following code to add its own set of directories to the global $LOAD_PATH.  This adds them AFTER the system directories which is wrong.

ZC has its own locale.rb file, loaded by
require "locale".

$LOAD_PATH being what it is, the system's locale.rb is loaded instead and zonecheck exits with an unknown symbol ZoneCheck::Locale.

Several ways to fix this (from best to worse):
1. rewrite zonecheck as a proper gem with locale.rb loaded by a zc.rb file like this:

require "zc/locale"

There are plenty of example of gems to look at.

2. rename zc/locale.rb as is apparently done by the debian port
3. checnge the code to load the zc directories BEFORE the system one.  The included patch does this.

Ollivier Robert <keltia>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24130:  zc305.diff added by keltia (302B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by keltia (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-10-10 keltia Attached File- Added zc305.diff, #24130

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code