Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344128 - Offline mode should work when configuring target-platform-configuration to use a target definition file
Summary: Offline mode should work when configuring target-platform-configuration to us...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Tobias Oberlies CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 10:01 EDT by Benjamin Cabé CLA
Modified: 2021-04-28 16:55 EDT (History)
1 user (show)

See Also:


Attachments
log (22.08 KB, text/plain)
2011-04-28 10:03 EDT, Benjamin Cabé CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Cabé CLA 2011-04-28 10:01:31 EDT
While offline mode is brutaly fast and works well if you simply use p2 repositories to define you implicit target platform, it is not working if you use a target definition file (see tycho-demo/itp04-rcp for example)
Comment 1 Benjamin Cabé CLA 2011-04-28 10:03:34 EDT
Created attachment 194270 [details]
log

Debug log of a "mvn install -o -X" of itp04-rcp ran right after a successful "mvn install"
Comment 2 Tobias Oberlies CLA 2011-08-16 05:03:58 EDT
I can confirm that offline mode was broken in 0.12.0 when using target files. It only worked for target platforms defined via repositories with layout p2.
Steps to reproduce:
1. Remove the repositories sections from /tycho-its/projects/target.offlineMode/pom.xml
2. Force the OfflineModeTest to use Tycho 0.12.0 by adding
        verifier.getCliOptions().remove("-Dtycho-version=" + getTychoVersion());
        verifier.getCliOptions().add("-Dtycho-version=0.12.0");
3. Run the OfflineModeTest (e.g. directly from the IDE)

The problematic code was removed during the work for bug 342808, so this this bug is fixed since ef10a61. 

I could write an extended offline mode integration test which would have discovered this issue, but with the new code structure, I believe that the offline mode is very unlikely to break again unnoticed - even with only the existing test. To save integration test execution time, I decided to not extend the test.
Comment 3 Tobias Oberlies CLA 2011-08-16 05:13:56 EDT
Just one additional remark: There is one limitation to the offline mode support - the p2.index file will still be downloaded when in offline mode. The problem is that p2 currently doesn't allow to cache this file (see bug 337022 and bug 310546). 
If someone is really concerned about this behaviour, feel free to open a new bug for this in Tycho and/or to drive the fix of the p2 bug(s).