bugGNUstep - Bugs: bug #30548, [NSBundle bundleForClass:] doesn't...

Group
 
 

bug #30548: [NSBundle bundleForClass:] doesn't work for framework libraries

Submitter:  Sergei Golovin <svg>
Submitted:  Mon 26 Jul 2010 07:41:08 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 26 Jul 2010 02:41:52 PM UTC, comment #5: 

Excellent

Thanks for you help, the test case was really good. ;-)

Nicola Pero <nico>
Group Member
Mon 26 Jul 2010 02:20:05 PM UTC, comment #4: 

It works now for me

Sergei Golovin <svg>
Mon 26 Jul 2010 02:12:01 PM UTC, comment #3: 

Forgot to say ... please confirm if it now works for you or not! :-)

Thanks

Nicola Pero <nico>
Group Member
Mon 26 Jul 2010 02:11:09 PM UTC, comment #2: 

Thanks Sergey

it's delicate as your test required two features that were unsupported up to now:

  • class names with numbers in it (testFramework1).  I fixed gnustep-make to properly generate class lists even when there are numbers in class names


  • frameworks with relative paths.  In your test, LD_LIBRARY_PATH is set to ../testFramework.framework/Versions/Current.  That was actually unsupported in gnustep-base.  I have implemented support for it in the assumption that a relative path would be relative to the launch directory.


Please try again with gnustep-make and gnustep-base from trunk - it works for me now :-)

Thanks

Nicola Pero <nico>
Group Member
Mon 26 Jul 2010 08:31:27 AM UTC, comment #1: 

forgot to mention
base r31018

Sergei Golovin <svg>
Mon 26 Jul 2010 07:41:08 AM UTC, original submission:  

Suppose the class "A" different from the framework principal one is embeded in the library belonging to a framework.
In this case [NSBundle bundleForClass:[A class]] doesn't return the framework bundle. It only works for the principal class.

The attached file contains the test case.

Step to reproduce
$ tar xjf framework2.tar.bz2
$ cd framework2
$ make
$ cd unit
$ make
$ ./testcase.sh
2010-07-26 11:25:20.783 testcase[14085] File NSBundle.m: 1288. In -[NSBundle initWithPath:] NSBundle -initWithPath: requires absolute path names, given '../testFramework.framework'
2010-07-26 11:25:20.784 testcase[14085] Result: /home/svg/src/tests/framework2/unit/Resources/testcase

but the line with 'Result' should be the path to the bundle testFramework.framework.

Sergei Golovin <svg>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #21071:  NSBundle_framework_libraries.patch added by svg (1KiB - text/x-patch - The patch to fix the problem could be like this)
file #21068:  framework2.tar.bz2 added by svg (998B - application/x-bzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nico (Posted a comment)
  • -email is unavailable- added by svg (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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-26 nico Open/ClosedIn Test Closed
    2010-07-26 nico Open/ClosedOpen In Test
    2010-07-26 svg Attached File- Added NSBundle_framework_libraries.patch, #21071
    2010-07-26 svg Attached File- Added framework2.tar.bz2, #21068

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code