Separate upgrade and install into two tasks.