diff options
author | Sebastian Ratz | 2020-07-09 15:19:11 +0000 |
---|---|---|
committer | Mickael Istria | 2021-08-13 08:03:25 +0000 |
commit | c8ec4912b4f53ba9972f44b1121baf86a85bf451 (patch) | |
tree | 58d313b2661ffc00a2e6e7836b794046cae37547 | |
parent | 9245ab96f36afcfbd52f08227f4f4421762e1469 (diff) | |
download | rt.equinox.p2-c8ec4912b4f53ba9972f44b1121baf86a85bf451.tar.gz rt.equinox.p2-c8ec4912b4f53ba9972f44b1121baf86a85bf451.tar.xz rt.equinox.p2-c8ec4912b4f53ba9972f44b1121baf86a85bf451.zip |
Bug 565091 - 'Refresh' in 'Available Update Sites' has no effect on
Composite's children
Change-Id: I4fdbcb55c5d58609ac38df8f172282a1171b1a5d
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/166057
Tested-by: Equinox Bot <equinox-bot@eclipse.org>
Reviewed-by: Mickael Istria <mistria@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java index 81083d924..e85bdb2cb 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java @@ -32,8 +32,7 @@ import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; import org.eclipse.equinox.p2.core.*; import org.eclipse.equinox.p2.core.spi.IAgentService; import org.eclipse.equinox.p2.query.*; -import org.eclipse.equinox.p2.repository.IRepository; -import org.eclipse.equinox.p2.repository.IRepositoryManager; +import org.eclipse.equinox.p2.repository.*; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository; import org.eclipse.equinox.security.storage.EncodingUtils; import org.eclipse.osgi.util.NLS; @@ -197,6 +196,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager clearNotFound(location); boolean wasEnabled = isEnabled(location); String nick = getRepositoryProperty(location, IRepository.PROP_NICKNAME); + String system = getRepositoryProperty(location, IRepository.PROP_SYSTEM); //remove the repository so event is broadcast and repositories can clear their caches if (!removeRepository(location)) fail(location, ProvisionException.REPOSITORY_NOT_FOUND); @@ -205,6 +205,11 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager IRepository<T> result = loadRepository(location, monitor, null, 0); loaded = true; setEnabled(location, wasEnabled); + if (result instanceof ICompositeRepository<?>) { + for (URI childLocation : ((ICompositeRepository<?>) result).getChildren()) { + basicRefreshRepository(childLocation, monitor); + } + } return result; } finally { //if we failed to load, make sure the repository is not lost @@ -212,6 +217,9 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager addRepository(location, wasEnabled, true); if (nick != null) setRepositoryProperty(location, IRepository.PROP_NICKNAME, nick); + if (system != null) { + setRepositoryProperty(location, IRepository.PROP_SYSTEM, system); + } } } |