Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add burn support for only caching packages #213

Merged
merged 8 commits into from Jun 7, 2015

Conversation

heaths
Copy link
Contributor

@heaths heaths commented Feb 28, 2015

Rebased and squashed on top of the current develop HEAD. This does not include the async install as there was some debate about it and we do not think we'll need it going forward anyway.

@barnson
Copy link
Member

barnson commented Mar 1, 2015

Let's talk about this at Tuesday's meeting. We'd talked about making this something the BA could tell the engine to do rather than making it an all-engine job.

@heaths
Copy link
Contributor Author

heaths commented Mar 1, 2015

My $0.02 in case I can't make triage: take this into wix3 as-is. Any changes to the BA will likely require an interface change which I know @robmen is rethinking for wix4.

@heaths
Copy link
Contributor Author

heaths commented Mar 4, 2015

If this looks good, I'll make the same changes for the wix4 branch. @rseanhall , please have a look as well since I know you have a related PR.

@@ -452,6 +454,9 @@ extern "C" HRESULT ApplyCache(
hr = UserExperienceInterpretExecuteResult(pUX, FALSE, MB_OKCANCEL, nResult);
ExitOnRootFailure(hr, "UX aborted cache.");

// When in cache mode, we want to download in the background (if the download mechanism supports it).
BOOL fPreferBackgroundDownload = (BOOTSTRAPPER_ACTION_CACHE == pPlan->action);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems pretty magical. Seems like BITS needs more callbacks (or something) to handle it's priority. Not great answer here but this may be the best can do in v3.x. @barnson, thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about using the "idle" levels for something with UI. But not worth an interface change, for sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Background downloads removed. Originally it was to support async execution anyway, so probably didn't fit well with this change anyway.

@heaths
Copy link
Contributor Author

heaths commented Mar 12, 2015

Since you took @rseanhall's implementation, is there any point in this PR now? I don't understand what he was getting at since he was claiming there was a bug in something that Burn didn't seem to support (which was waiting on the original PR that included async).

heaths added 2 commits May 9, 2015 13:54
Conflicts:
	History.md
	src/burn/engine/plan.cpp
Resolves issue #4432 by adding a BOOTSTRAPPER_ACTION_CACHE mode that BAs can set (i.e. Burn does not directly
support setting via command line) and will plan to cache all package types by default.

WixStdBA was updated to support this mode if opted in via a new @SupportCacheOnly attribute.
@@ -1920,6 +1927,10 @@ static HRESULT GetActionDefaultRequestState(

switch (action)
{
case BOOTSTRAPPER_ACTION_CACHE:
*pRequestState = BOOTSTRAPPER_REQUEST_STATE_CACHE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be like MODIFY, it depends on the current state of the package. If the package is PRESENT and the default action is CACHE, then the package would get uninstalled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'll need to go back and check our internal code since this has changed a bit to see if there's a problem there. Looking through the current and request states, seems it's just (current->requested): present->present, cache->none (though I can't find anything in the code not commented out that sets BOOTSTRAPPER_PACKAGE_STATE_CACHE), and *->cache.

Conflicts:
	History.md
	src/ext/BalExtension/wixext/BalCompiler.cs
	src/ext/BalExtension/wixext/Xsd/bal.xsd
	src/ext/BalExtension/wixext/data/tables.xml
	src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp
@rseanhall
Copy link
Contributor

This looks like it's ready to merge (except for the History.md changes that are easily fixed). I'll have to test out the failure scenario and see what get left behind in the cache.

barnson added a commit that referenced this pull request Jun 7, 2015
Add burn support for only caching packages
@barnson barnson merged commit e0afc83 into wixtoolset:develop Jun 7, 2015
@heaths heaths deleted the issue4432 branch June 7, 2015 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants