Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6680

Descendant providers do not inherit features from ancestors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 3.8.7
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
    • Template:
    • Team:
      Platform OS

      Description

      My package-provider is very simple – it derives from the stock gem-provider and overwrites gemcmd to use the gem-executable installed with RedHat's rh-ruby22 package for RHEL/CentOS-6 (where the default Ruby is 1.8.7):

      require 'puppet/provider/package'
       
      Puppet::Type.type(:package).provide File.basename(__FILE__, ".rb"),
          :parent => :gem, :source => :gem do
              desc "Ruby Gem support using gem from the #{@name}-package"
       
              has_feature :versionable, :install_options
       
              commands :gemcmd => "/opt/rh/rh-#{@name.to_s}/root/usr/bin/gem"
      end
      

      Until I added the has_feature-line, my attempts to specify customized install_options were quietly ignored. The descendant provider should've inherited the features of the parent.

      On a separate note, when a provider that does not have the install_options-flag set, is used with the install_options-attribute in a manifest, an error (or a warning) should be generated. Quietly ignoring the flags in the manifest is a separate bug.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mi Mikhail T.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support