Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-update-dev] update site in homedir patch - bug #90630


The patch looks fine to me.
I would suggest a small change in the error handling. If the creation of the new site in the user's home directory fails (try/catch below), but the folder has just been created, it must be removed upon failure.

+                                                                    // there are no updateable sites, the installation location is read-only and we are installing a new feature
+                                                                    // make an update site in the user's home direcotry
+                                                                    String sitePath = System.getProperty("user.home") + File.separator + ".eclipse" + File.separator + //$NON-NLS-1$
+                                                                                     Platform.getProduct().getId() + File.separator + "updates"; //$NON-NLS-1$
+                                                                    
+                                                                    try {
+                                                                                     csite = config.createConfiguredSite(new File(sitePath));
+                                                                                     config.addConfiguredSite(csite);
+                                                                                     IStatus status = csite.verifyUpdatableStatus();
+                                                                                     if (!status.isOK())
+                                                                                                      throw new CoreException(status);
+                                                                                    
+                                                                    } catch (CoreException e) {
+                                                                                     // there was a problem, the user must choose an installation site
+                                                                                     csite = null;
+                                                                    }
                                                                   }
With the fix, I would give a +1 for the patch.

-Dorian



"Cena, Bernard (IT)" <Bernard.Cena@xxxxxxxxxxxxxxxxx>
Sent by: platform-update-dev-bounces@xxxxxxxxxxx

01/30/2006 05:25 AM

Please respond to
"Eclipse Platform Update component developers list."

To
<platform-update-dev@xxxxxxxxxxx>
cc
Subject
RE: [platform-update-dev] update site in homedir patch - bug #90630





> Message: 1
> Date: Sat, 28 Jan 2006 21:41:32 -0500
> From: Ben Konrath <bkonrath@xxxxxxxxxx>
> Subject: [platform-update-dev] update site in homedir patch - bug
>                  #90630
> To: platform-update-dev@xxxxxxxxxxx
> Message-ID: <1138502492.7681.13.camel@xxxxxxxxxxxxxxxxxxxxxxx>
> Content-Type: text/plain
>
> Hi,
>
> I was wondering if anybody has had a chance to look at the update
> site in homedir patch attached to bug #90630 [1]? I think that the
> functionality that the patch adds is useful and it would be nice if
> it were included in Eclipse 3.2. I would appreciate any feedback
> about the patch so that I can fix any further problems with it.    
>
> Thanks, Ben
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=90630

We'd be VERY interested in having this feature in 3.2 - our user base is
~500 at the moment and we maintain Linux, Solaris and Windows versions
of Eclipse. We install Linux/Solaris in a shared RO location and about
to introduce a locked down Windows build (installed on user's box) which
only has a specified dir available as RW to the user - Eclipse would be
installed by a privilaged script and the location would be RO for the
user. Ability to default an install location for all plugins to a custom
dir outside the Eclipse installation would be VERY welcome.
Thanks
Bernard Cena
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.
_______________________________________________
platform-update-dev mailing list
platform-update-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-update-dev


Back to the top