Ask Your Question
0

How does a windows package define cumulative updates?

asked 2014-06-18 15:50:24 -0500

Steve Clement gravatar image

What is the proper package definition for a piece of windows software that is updated cumulatively rather than having the update available as a full install? By cumulatively I mean that in order to install an update the base version (or at least some prior version) must install first, and then the update can be applied.

A concrete example here would be defining the class for Visual Studio 2012. The final state should be VS2012 with update 4 installed. The installer media for the base version of VS2012 is completely different from the U4 bits. (For reference - base version = 11.0.50727, U4 version = 11.0.61030). Basically, what I'm trying to do is the following:

    package { "Microsoft Visual Studio Premium 2012":
    ensure    => present,
    source    => "${medialocation}\\vs_premium.exe",
    install_options =>  ['/adminfile ${answerfile}', '/quiet', '/norestart'],
    require => Package['Microsoft Visual Studio 2010 Premium - ENU']
   } 
  -> 
   package { "Microsoft Visual Studio Premium 2012":
    ensure    => '11.0.61030',
    source    => "${updatelocation}\\vs2012.4.exe",
    install_options =>  ['/q'],
    require => Package['Microsoft Visual Studio 2010 Premium - ENU']
   }

In this scenario, the package name is the same regardless of version, but the base version needs to be installed first. Trying to put this in words, what I'm trying to say here is "First check to see if this package is installed. If not, install from the first location. Once that's done, or if it is already installed, ensure that the installed version is the one specified."

Unfortunately, the code as specified gives the "Duplicate Declaration" error since the package name is the same. There are a number of applications that will follow this pattern, so any recommendations on how to manage this scenario would be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-06-19 07:19:49 -0500

3h4x gravatar image

I understand what you are trying to achive. Hmm the way I would deal with it would be put require table in package in order to install prior packages. You won't overcome unique name for declaration and it is there for a reason.

package  { "Microsoft Visual Studio Premium 2012":
  ensure    => '11.0.61030',
  source    => "${updatelocation}\\vs2012.4.exe",
  install_options =>  ['/q'],
  require => [Package['Microsoft Visual Studio 2010 Premium - ENU'], Package['Microsoft Visual Studio 2010 Premium - U3]', Package['Microsoft Visual Studio 2010 Premium - U2]'], 
}

That way before installation of the latest update, all previous must be installed.

edit flag offensive delete link more

Comments

Doesn't that require definition expect that the previous updates have different package names? The problem I'm having here is that the package name is the same regardless of version.

Steve Clement gravatar imageSteve Clement ( 2014-06-19 10:56:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-06-18 15:50:24 -0500

Seen: 605 times

Last updated: Jun 19 '14