Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 124858 Details for
Bug 212811
[ui] The sizing phase should not return a size when some artifacts are missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Missing Sizes/Artifact detection during Sizing
MissingArtifactSizes.patch (text/plain), 2.88 KB, created by
Matthew Piggott
on 2009-02-05 14:46:17 EST
(
hide
)
Description:
Missing Sizes/Artifact detection during Sizing
Filename:
MIME Type:
Creator:
Matthew Piggott
Created:
2009-02-05 14:46:17 EST
Size:
2.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.engine >Index: src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java,v >retrieving revision 1.12 >diff -u -r1.12 Sizing.java >--- src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java 14 Jan 2009 06:34:08 -0000 1.12 >+++ src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java 5 Feb 2009 19:42:41 -0000 >@@ -21,6 +21,7 @@ > import org.eclipse.equinox.internal.provisional.p2.engine.*; > import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; > import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType; >+import org.eclipse.osgi.util.NLS; > > public class Sizing extends InstallableUnitPhase { > private static final String PHASE_ID = "sizing"; //$NON-NLS-1$ >@@ -29,6 +30,9 @@ > private long sizeOnDisk; > private long dlSize; > >+ public static int INCOMPLETE_DISK_SIZE = 1; >+ public static int INCOMPLETE_DOWNLOAD_SIZE = 2; >+ > public Sizing(int weight, String phaseName) { > super(PHASE_ID, weight); > } >@@ -70,6 +74,7 @@ > protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) { > List artifactRequests = (List) parameters.get("artifactRequests"); //$NON-NLS-1$ > ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT); >+ int status = 0; > > Set artifactsToObtain = new HashSet(artifactRequests.size()); > >@@ -94,6 +99,7 @@ > > for (Iterator iterator = artifactsToObtain.iterator(); iterator.hasNext() && !monitor.isCanceled();) { > IArtifactRequest artifactRequest = (IArtifactRequest) iterator.next(); >+ boolean found = false; > for (int i = 0; i < repositories.length; i++) { > IArtifactRepository repo; > try { >@@ -107,12 +113,22 @@ > if (descriptors.length > 0) { > if (descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE) != null) > sizeOnDisk += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE)); >+ else >+ status |= INCOMPLETE_DISK_SIZE; > if (descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE) != null) > dlSize += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE)); >+ else >+ status |= INCOMPLETE_DOWNLOAD_SIZE; >+ found = true; > break; > } > } >+ if (!found) >+ // The artifact wasn't present in any repository >+ return new Status(IStatus.ERROR, phaseId, NLS.bind(Messages.Phase_Sizing_Error, getClass().getName())); > } >+ if (status != 0) >+ return new Status(IStatus.WARNING, phaseId, status, NLS.bind(Messages.Phase_Sizing_Error, getClass().getName()), null); > return null; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
susan
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 212811
: 124858 |
124859