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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Sergei Golovin <svg>
Submitted on:  Mon 26 Jul 2010 07:41:08 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

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>
Project 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>
Project 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>
Project 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>

 

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
  • -unavailable- added by nico (Posted a comment)
  • -unavailable- added by svg (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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Jul 2010 02:41:52 PM UTCnicoOpen/ClosedIn Test=>Closed
    Mon 26 Jul 2010 02:11:09 PM UTCnicoOpen/ClosedOpen=>In Test
    Mon 26 Jul 2010 10:04:25 AM UTCsvgAttached File-=>Added NSBundle_framework_libraries.patch, #21071
    Mon 26 Jul 2010 07:41:08 AM UTCsvgAttached File-=>Added framework2.tar.bz2, #21068

    Back to the top


    Powered by Savane 3.1-cleanup1