Skip to content

Commit

Permalink
Revert "Pkg: explain why rm is noop when attempting to remove a packa…
Browse files Browse the repository at this point in the history
…ge that is dependency"

This reverts commit d5750f7.
  • Loading branch information
StefanKarpinski committed Aug 20, 2013
1 parent 5577f8e commit c07c491
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions base/pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ add(pkg::String, vers::VersionNumber...) = add(pkg, VersionSet(vers...))
init(meta::String=Dir.DEFAULT_META) = Dir.init(meta)

edit(f::Function, pkg, args...) = Dir.cd() do
msg = ""
r = Reqs.read("REQUIRE")
reqs = Reqs.parse(r)
avail = Read.available()
if !haskey(avail,pkg) && !haskey(reqs,pkg)
error("unknown package $pkg")
end
r_ = f(r,pkg,args...)
r_ == r && begin
if (f == Reqs.rm) msg = " Cannot remove yet: $pkg is required by installed package." end
return info("Nothing to be done.$msg")
end
r_ == r && return info("Nothing to be done.")
reqs_ = Reqs.parse(r_)
reqs_ != reqs && _resolve(reqs_,avail)
Reqs.write("REQUIRE",r_)
Expand Down Expand Up @@ -366,4 +362,4 @@ end
fixup() = Dir.cd(_fixup)
fixup(pkg) = Dir.cd(()->_fixup(pkg))

end # module
end # module

0 comments on commit c07c491

Please sign in to comment.