A post install hook that just won't work

Showing 1-16 of 16 messages
A post install hook that just won't work Holger Sindbæk 5/4/13 4:36 PM
I'm trying to install DTCoreText - https://github.com/Cocoanetics/DTCoreText?source=cr - from a fork I made and cloned to my mac - https://github.com/holgersindbaek/DTCoreText?source=cr.

So I'm doing it by saying:

pod 'DTCoreText', :path => '~/Projects/*Defaults/Misc/Cocoapods/DTCoreText', :branch => 'develop'

Problem is that when I run pod install or pod update, it gives me an error related to the post install hook:

[!] The post install hook of DTCoreText (1.4.2) is not compatible with this version of CocoaPods.

No such file or directory - /Users/holgersindbaek/Projects/Uninkd/Uninkd_IOS_Enterprise/Pods/DTCoreText/Core/Source/

/Users/holgersindbaek/Projects/Uninkd/Uninkd_IOS_Enterprise/Pods/Local Podspecs/DTCoreText.podspec:26:in `chdir'
/Users/holgersindbaek/Projects/Uninkd/Uninkd_IOS_Enterprise/Pods/Local Podspecs/DTCoreText.podspec:26:in `block (2 levels) in _eval_podspec'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-core-0.19.1/lib/cocoapods-core/specification.rb:419:in `call'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-core-0.19.1/lib/cocoapods-core/specification.rb:419:in `post_install!'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:476:in `run_spec_post_install_hook'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:451:in `block (3 levels) in run_post_install_hooks'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:449:in `each'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:449:in `block (2 levels) in run_post_install_hooks'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:447:in `each'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:447:in `block in run_post_install_hooks'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/user_interface.rb:113:in `message'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:446:in `run_post_install_hooks'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:112:in `block in generate_pods_project'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/user_interface.rb:52:in `section'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:108:in `generate_pods_project'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/installer.rb:86:in `install!'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/command/project.rb:40:in `run_install_with_update'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/command/project.rb:84:in `run'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/claide-0.2.0/lib/claide.rb:535:in `run'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/lib/cocoapods/command.rb:48:in `run'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/gems/cocoapods-0.19.1/bin/pod:16:in `<top (required)>'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/bin/pod:19:in `load'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/bin/pod:19:in `<main>'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/holgersindbaek/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'

I'm not sure what I can do to get rid of this error. You can find the podspec here - https://github.com/Cocoanetics/DTCoreText/blob/develop/DTCoreText.podspec.

When I install form the online repo, it works fine, but I want to develop on this pod, so I need it to work locally.

Please advice

Re: A post install hook that just won't work Fabio Pelosin 5/6/13 1:34 AM
This is a know issue (there is a ticket for it in the CP repo). It basically, reports the wrong path. Not the local one but the one that the pod would have in the Pods folder.

Sent from my iPhone


--
You received this message because you are subscribed to the Google Groups "CocoaPods" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocoapods+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: A post install hook that just won't work Eloy Durán 5/6/13 2:38 AM
This ticket: https://github.com/CocoaPods/CocoaPods/issues/1003.

A patch for this would be much appreciated!
Re: A post install hook that just won't work Holger Sindbæk 5/6/13 6:14 AM
Aha... that really sucks. Any estimate on when a patch will be made?

@Fabio would be great if you could write in the ticket, that you also have the same problem, so people know it's not just one person.
Re: A post install hook that just won't work Fabio Pelosin 5/6/13 6:22 AM
I don't have the same problem, I'm aware of it as I'm a contributor to CP :-)
Re: A post install hook that just won't work Holger Sindbæk 5/6/13 6:22 AM
Arh ok. Looking forward to a solution :-).

-- 

Holger Sindbaek

Co-founder
You received this message because you are subscribed to a topic in the Google Groups "CocoaPods" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cocoapods/daw2c5zzmi8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cocoapods+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: A post install hook that just won't work Eloy Durán 5/6/13 6:24 AM
On May 6, 2013, at 3:14 PM, holger sindbæk <holgers...@gmail.com> wrote:

> Aha... that really sucks. Any estimate on when a patch will be made?

Nope. I was basically asking you if you could whip up a patch for it :) The reason is that both Fabio and I are already swamped these weeks and so that ticket was created as a TODO for later on, but I would really love to see this one get fixed sooner than later. We can and will help you out if you need guidance, though.

Eloy
Re: A post install hook that just won't work Holger Sindbæk 5/6/13 6:26 AM
I'm not sure I can do it (not even sure how to run a local version of cocoa pods from my mac).

Would be great if you can give some pointers and I'll see what I can do.

-- 

Holger Sindbaek

Co-founder
--
You received this message because you are subscribed to a topic in the Google Groups "CocoaPods" group.
To unsubscribe from this group and all its topics, send an email to cocoapods+...@googlegroups.com.

Re: A post install hook that just won't work Eloy Durán 5/6/13 6:52 AM
You should be able to setup for development with the following two wiki articles:


Don’t hesitate to ask  when you run into an issue!

You received this message because you are subscribed to the Google Groups "CocoaPods" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocoapods+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: A post install hook that just won't work Holger Sindbæk 5/6/13 6:59 AM
Great, thanks. And in which files do you think the magic is gonna happen?

-- 

Holger Sindbaek

Co-founder
Re: A post install hook that just won't work Eloy Durán 5/6/13 7:15 AM
I don’t know from the top of my head, maybe Fabio has a better idea, but he just went out for the rest of the day. I would definitely look in:

https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification.rb#L419, in particular, we should probably pass a PodRepresentation instance here as well and that class should take care of returning the actual path.

If you uncomment this line: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods.rb#L77 and set the env variable to ‘development’, it loads Pry, which might be an easier way to insert some breakpoints/debugging calls: https://github.com/pry/pry.

In any case, the first priority is identifying the places that are related to this issue, how it currently works, and how it should work. If you at least update the ticket with that info, then we can offer better advice for the actual fix.

Eloy
Re: A post install hook that just won't work Fabio Pelosin 5/6/13 3:03 PM
Sorry I didn't check the actual hook, as I assumed that it was the bug described in the linked issue. Actually the bug is due to the implementation of the hook which assumes that the library is stored in the Pods folder.

Can you verify that changing this part of the podspec:

  spec.post_install do |library_representation|
    Dir.chdir(library_representation.sandbox_dir + 'DTCoreText/Core/Source/') do

To this:

  spec.pre_install do |pod_representation, library_representation|
    Dir.chdir(pod_representation.root + 'Core/Source/') do

Actually solves the issue.
Re: A post install hook that just won't work Holger Sindbæk 5/6/13 3:12 PM
Just tried it and it's working perfectly. That's awesome… thanks :-).

-- 

Holger Sindbaek

Co-founder
Re: A post install hook that just won't work Fabio Pelosin 5/6/13 3:18 PM
Nice, it would be great if you could submit a pull request to the original repo and to the specs repo.
Re: A post install hook that just won't work Holger Sindbæk 5/6/13 3:19 PM
No worries, I'm on it.

Talking to the author of the repo.

-- 

Holger Sindbaek

Co-founder
Re: A post install hook that just won't work Eloy Durán 5/6/13 3:36 PM
Oh, it’s my bad then, I thought it was the same issue too :)