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

 
 

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

Submitted by:  Ollivier Robert <keltia>
Submitted on:  Mon 10 Oct 2011 02:59:04 PM UTC  
 
Category: configSeverity: High
Priority: 5 - NormalItem Group: Crash/Error
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
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
  • -unavailable- added by keltia (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Oct 2011 02:59:04 PM UTCkeltiaAttached File-=>Added zc305.diff, #24130

    Back to the top


    Powered by Savane 3.1-cleanup1