From 1eb72ace8d8dd1e8ce85ec5bc9a67dbdf8ce1a7c Mon Sep 17 00:00:00 2001 From: kohsuke Date: Wed, 10 Mar 2010 02:30:10 +0000 Subject: [PATCH] On RPM/DEB/etc installation, don't offer the self upgrade. It should be done by the native package manager. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28479 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/lifecycle/Lifecycle.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/lifecycle/Lifecycle.java b/core/src/main/java/hudson/lifecycle/Lifecycle.java index 5bd4b9ef4c..cd2d747aba 100644 --- a/core/src/main/java/hudson/lifecycle/Lifecycle.java +++ b/core/src/main/java/hudson/lifecycle/Lifecycle.java @@ -147,7 +147,8 @@ public abstract class Lifecycle implements ExtensionPoint { */ public boolean canRewriteHudsonWar() { // if we don't know where hudson.war is, it's impossible to replace. - return getHudsonWar()!=null; + File f = getHudsonWar(); + return f!=null && f.canWrite(); } /**