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

Pkg: explain why rm is noop when attempting to remove a package that is dependency #4108

Merged
merged 1 commit into from
Aug 20, 2013

Conversation

ihnorton
Copy link
Member

This adds an explanation for the no-op message in that situation.
@StefanKarpinski

StefanKarpinski added a commit that referenced this pull request Aug 20, 2013
Pkg: explain why rm is noop when attempting to remove a package that is dependency
@StefanKarpinski StefanKarpinski merged commit 06f9b61 into JuliaLang:master Aug 20, 2013
@StefanKarpinski
Copy link
Member

So after trying this out, I realize that this doesn't at all do what you want it too. If r_ == r then this change literally didn't alter the REQUIRE file at all, in which case it's not at all mysterious that it doesn't do anything. Unfortunately, getting the actual warning you want is not entirely straightforward.

@ihnorton
Copy link
Member Author

The message is shown in this situation:

julia> Pkg.add("Winston")
INFO: Installing Winston v0.3.1
INFO: Installing Cairo v0.2.6
INFO: Installing Color v0.2.5
INFO: Installing IniFile v0.2.1
INFO: Installing Tk v0.2.4
INFO: Running build script for package Cairo
INFO: Running build script for package Tk
INFO: REQUIRE updated.

julia> Pkg.rm("Cairo")
INFO: Nothing to be done. Cannot remove yet: Cairo is required by installed package.

but only on the second run when the dependency is installed first:

julia> Pkg.rm("Winston")
INFO: Removing Winston v0.3.1
INFO: Removing Cairo v0.2.6
INFO: Removing IniFile v0.2.1
INFO: Removing Tk v0.2.4
INFO: Removing Color v0.2.5
INFO: REQUIRE updated.

julia> Pkg.add("Cairo")
INFO: Installing Cairo v0.2.6
INFO: Installing Color v0.2.5
INFO: Running build script for package Cairo
INFO: REQUIRE updated.

julia> Pkg.add("Winston")
INFO: Installing Winston v0.3.1
INFO: Installing IniFile v0.2.1
INFO: Installing Tk v0.2.4
INFO: Running build script for package Tk
INFO: REQUIRE updated.

julia> Pkg.rm("Cairo")
INFO: No packages to install, update or remove.
INFO: REQUIRE updated.

julia> Pkg.rm("Cairo")
INFO: Nothing to be done. Cannot remove yet: Cairo is required by installed package.

@StefanKarpinski
Copy link
Member

Hmm. I'm not sure how I feel about this only-on-the-second-time behavior. That seems a bit weird.

@tkelman
Copy link
Contributor

tkelman commented Jul 28, 2015

Looks like this message was lost somewhere in a pkg1 -> pkg2 rewrite? Ref #7757

Nevermind, it was straight-up reverted in c07c491.

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