Ubuntu

Eclipse does not include the relevant software plugin repository

Reported by Roshan George on 2011-10-13
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Undecided
Unassigned

Bug Description

Among the 'Available Update Sites' listing in Eclipse's preferences are repositories for the previous releases (including updates for 3.4, 3.5, 3.6 and a release repo for helios). However, the version of Eclipse in Ubuntu is 3.7 (Indigo) so the corresponding repository for indigo: http://download.eclipse.org/releases/indigo/ should be included there and enabled by default. The absence of this repository and the fact that eclipse-gef is not packaged means that certain plugins (like the Android Development Tools plugin) will fail to install without adding the indigo repository first.

In earlier releases, the lack of this repository bug #474888 and others, and it was fixed by including the corresponding software repositories for helios (the previous Eclipse release).

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: eclipse 3.7.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Thu Oct 13 12:54:21 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110921.2)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_IN:en
 PATH=(custom, no user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: eclipse
UpgradeStatus: No upgrade log present (probably fresh install)

Roshan George (roshan-george) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eclipse (Ubuntu):
status: New → Confirmed
Adrian Wilkins (adrian-wilkins) wrote :

The underlying problems here appear to be....

 * The repository list in the /usr/bin/eclipse startup script is still that for Helios, but the release for Oneiric has been updated to Indigo
 * The repo injection functions in the script are broken

If there's no .eclipse folder the startup script executes this command which creates it and pre-fills it

 /usr/lib/eclipse/eclipse -clean -initialize

It then hunts for the settings files governing p2 repositories so it can inject some extra entries.

The find commands in the script now locate 2 paths rather than one, then tests the string of two paths to see if it's a file ; it isn't, it's a list of two paths. Thus it fails to inject entries into the config.

e.g. for metadata, one set of settings in

 ~/.eclipse/org.eclipse.platform_3.7.0_155965261/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs

And one here

 ~/.eclipse/org.eclipse.platform_3.7.0_155965261/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs

The latter file appears to be the correct one for the metadata ; this is where eclipse stores any update sites you add for yourself.

The default files in the PlatformProfile.profile folder as created by this command appear to contain the Helios update sites as well ; and also references to the Galileo repositories (3.5). I'd be surprised if that were correct - these files look like they could do with a good cleanout. Since the way they are generated is hidden in the eclipse implementation, I'm not sure what contributes to their content.

Adrian Wilkins (adrian-wilkins) wrote :

Further reading indicates that the mess in the PlatformProfile folder is probably the fault of Eclipse....

Replacing /usr/bin/eclipse script with the following, deleting ~/.eclipse folder and running appears to work OK (note that I have removed GDK_NATIVE_WINDOWS=true because otherwise the thumbs don't get drawn on scrollbars in Unity)

#!/bin/sh

# work around for e#290395 / LP: #458703
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=290395
# https://bugs.launchpad.net/bugs/458703
# export GDK_NATIVE_WINDOWS=true

ECLIPSE=/usr/lib/eclipse/eclipse

inject_update_site(){
    if [ ! -e "$1" ] ; then
 echo "W: Cannot find $1" 2>&1
 return 1
    fi
    cat - >>"$1" <<EOF
repositories/http\:__download.eclipse.org_releases_indigo/enabled=true
repositories/http\:__download.eclipse.org_releases_indigo/isSystem=false
repositories/http\:__download.eclipse.org_releases_indigo/nickname=Indigo Update Site
repositories/http\:__download.eclipse.org_releases_indigo/uri=http\://download.eclipse.org/releases/indigo/
EOF

}

if [ ! -d ~/.eclipse/ ] ; then
    $ECLIPSE -clean -initialize || exit $?

    artifact=$(find ~/.eclipse \
        -name org.eclipse.equinox.p2.artifact.repository.prefs)
    metadata=$(find ~/.eclipse \
        -name org.eclipse.equinox.p2.metadata.repository.prefs)

    for PREFS in $artifact ; do
        inject_update_site $PREFS && \
        echo "I: Injected site to $PREFS" || echo "W: Failed to inject site to $PREFS" 2>&1
    done

    for PREFS in $metadata ; do
        inject_update_site $PREFS
        echo "I: Injected site to $PREFS" || echo "W: Failed to inject site to $PREFS" 2>&1
    done

fi

exec $ECLIPSE "$@"

Fabio Rafael Rosa (rafaelfdr) wrote :

The bug still occurs in 12.04 LTS .

Rebecca Palmer (rebecca-palmer) wrote :

"Fixed" in 12.10...by removing this repository altogether, which brings back bug 477944 (can't install plugins).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.