Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not reinstall if profile is same and is already installed #65

Merged
merged 4 commits into from
May 21, 2013
Merged

Do not reinstall if profile is same and is already installed #65

merged 4 commits into from
May 21, 2013

Conversation

xslim
Copy link
Contributor

@xslim xslim commented May 8, 2013

Sometimes I have a profile installed and I don't want to re-install it all the time.
Example when using like this

# Buildspec
pprofile_id = '840823DD-B3CC-456A-8F1A-XXX'
pprofile = Xcode::ProvisioningProfile.find_installed_by_uuid(pprofile_id)
puts "Using PProfile: #{pprofile.name} in #{pprofile.path}"
pprofile_path = pprofile.path

group :build do
  use :MyProject, :scheme => :MyScheme
  profile pprofile_path
end

@rayh
Copy link
Owner

rayh commented May 9, 2013

What's the issue in re-installing it? It just makes sure that the one
in ~/Library is the most recent version. You will likely run into
problems if you DONT install it when it changes as it will continue to
use the previously installed one. There is a /slight/ overhead in
copying it over, but I think it's negligible compared to the time it
takes to run the build.

On 8 May 2013 20:16, Taras Kalapun notifications@github.com wrote:

Sometimes I have a profile installed and I don't want to re-install it all
the time.
Example when using like this

Buildspec

pprofile_id = '840823DD-B3CC-456A-8F1A-XXX'
pprofile = Xcode::ProvisioningProfile.find_installed_by_uuid(pprofile_id)
puts "Using PProfile: #{pprofile.name} in #{pprofile.path}"
pprofile_path = pprofile.path

group :build do
use :MyProject, :scheme => :MyScheme
profile pprofile_path
end


You can merge this Pull Request by running

git pull https://github.com/xslim/xcoder master

Or view, comment on, or merge it at:

#65

Commit Summary

Do not reinstall if profile is same and is already installed

File Changes

M lib/xcode/provisioning_profile.rb (9)

Patch Links:

https://github.com/rayh/xcoder/pull/65.patch
https://github.com/rayh/xcoder/pull/65.diff

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 | http://ray.sh

@xslim
Copy link
Contributor Author

xslim commented May 9, 2013

here I check that re-install is not needed if we are pointing to ~/Library… so there will no be race condition

@rayh
Copy link
Owner

rayh commented May 21, 2013

I'm happy to take the other updates, but I'm still not sure why you need to check and avoid re-installing the profile. This makes the action a bit ambiguous (is it going to be installed?) and we will then also need to provide a mechanism for people to force install (when the profile changes, etc). I think it's much safe to assume the profile may have changed and re-install it. It's a cheap operation and removes the ambiguity.

@xslim
Copy link
Contributor Author

xslim commented May 21, 2013

What if I'm giving the path to the profile that is in Library folder where other profiles are installed, than the xcoder will just remove it and will not be able to install. A typical race condition. How would you prevent from this?
That's why I did such check.

rayh added a commit that referenced this pull request May 21, 2013
Do not reinstall if profile is same and is already installed
@rayh rayh merged commit 2ca3dab into rayh:master May 21, 2013
@rayh
Copy link
Owner

rayh commented May 21, 2013

Right, ok, I see.

On 21 May 2013 16:55, Taras Kalapun notifications@github.com wrote:

What if I'm giving the path to the profile that is in Library folder
where other profiles are installed, than the xcoder will just remove it
and will not be able to install. A typical race condition. How would you
prevent from this?
That's why I did such check.


Reply to this email directly or view it on GitHubhttps://github.com//pull/65#issuecomment-18192149
.

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 |
http://ray.sh

@IvanUshakov
Copy link
Contributor

I think it's same, that i do in #63

@xslim
Copy link
Contributor Author

xslim commented May 21, 2013

oh, ok. didn't see you merged it. Well, you can close than this one )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants