Feature/package version #15

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Collaborator

haf commented Apr 3, 2013

When I try this on another puppet module:

Error: Could not update: Execution of '/bin/rpm -U --oldpackage /tmp/riemann-0.2.0-1.noarch.rpm' returned 1:    package
riemann-0.2.0-1.noarch is already installed

Error: /Stage[main]/Riemann::Package/Package[riemann]/ensure: change from 0.2.0-1 to 0.2.0 failed: Could not update: Exe
cution of '/bin/rpm -U --oldpackage /tmp/riemann-0.2.0-1.noarch.rpm' returned 1:        package riemann-0.2.0-1.noarch i
s already installed

for code:

    $package_version = $version ? {
      ''      => 'installed',
      undef   => 'installed',
      default => $version,
    }
    package { 'riemann':
      ensure   => $package_version,
      source   => "/tmp/$package_name",
      provider => $package_provider,
      require  => Wget::Fetch['download_riemann'],
    }

Is this a problem with puppet or am I doing something wrong?

Bhuwan commented on 264c1c9 Mar 26, 2013

I don't think this will work, unless the version specified is the current version of Riak.

Check out the hard-coded download URL (http://downloads.basho.com.s3-website-us-east-1.amazonaws.com//riak/*--->CURRENT<----*)
I'll try it out later to confirm.

Collaborator

haf replied Mar 26, 2013

See a107146

Adding a parsing function to the mix
This ought to drive the ghosts out of the machinery, don't you
think, @Bhuwan?

Bhuwan commented on a107146 Mar 27, 2013

Looks good to me.

BTW -- I don't know how this happened, but one of our Vagrant boxes ended up with Riak 1.3.1 instead of 1.3.0, despite 1.3.0 being specified for the version... The installation goes exclusively through this Puppet module. If I can figure out what happened, I'll let you know.

Collaborator

haf commented Apr 30, 2013

It's because the module only installs the package but doesn't give the version parameter to the package installer; hence it will install that latest.

If you don't want the latest it would be a good thing to freeze the version as you wanted to do (but that you wanted to do once to target the latest version), but when that is done, I get the pasted (above) error from yum; so I can't let the package resource get the $version parameter until I can understand why giving it produces the errors.

Collaborator

haf commented Jul 27, 2013

The reason it gives errors is because of suffix on the semver that are needed for yum, such as "_1.el6", so that the version becomes "1.2.3_1.el6" or similar. That's next up to fix.

Collaborator

haf commented Nov 27, 2013

Closing thx to @rdark.

@haf haf closed this Nov 27, 2013

@mbbroberg mbbroberg deleted the feature/package-version branch Mar 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment