Issue #15456 has been updated by eric sorenson.

Status changed from Unreviewed to Accepted
Assignee set to John Wiegley

Looks good, can you submit a pull request against the '2.7.x' branch on github?
http://links.puppetlabs.com/contribute-to-puppet
----------------------------------------
Bug #15456: Allow macports provider to specific variants
https://projects.puppetlabs.com/issues/15456#change-68934

Author: John Wiegley
Status: Accepted
Priority: Normal
Assignee: John Wiegley
Category: package
Target version: 
Affected Puppet version: 2.7.17
Keywords: macports variants
Branch: 


In macports.rb, you'll see this line:

      output = port("-q", :install, @resource[:name], "@#{should}")

If changed to this:

      output = port("-q", :install, @resource[:name], "#{should}")

Then you can freely specify variants as well as versions:

    package { foo:
        ensure => "@1.0.0";
    }

    package { foo:
        ensure => "+bar";
    }

    package { foo:
        ensure => "@1.0.0+bar";
    }

We could support specifying only a version by changing that line to this:

      if should =~ /^[^@+]+$/ then should = "@" + should end
      output = port("-q", :install, @resource[:name], "#{should}")

This retains backwards compatibility, but allows allow of the MacPorts syntax.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to