diff --git a/base/pkg.jl b/base/pkg.jl index c80d24883454d..bb94ac82ee9de 100644 --- a/base/pkg.jl +++ b/base/pkg.jl @@ -21,6 +21,7 @@ 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() @@ -28,7 +29,10 @@ edit(f::Function, pkg, args...) = Dir.cd() do error("unknown package $pkg") end r_ = f(r,pkg,args...) - r_ == r && return info("Nothing to be done.") + 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 reqs_ = Reqs.parse(r_) reqs_ != reqs && _resolve(reqs_,avail) Reqs.write("REQUIRE",r_) @@ -362,4 +366,4 @@ end fixup() = Dir.cd(_fixup) fixup(pkg) = Dir.cd(()->_fixup(pkg)) -end # module \ No newline at end of file +end # module