Jira (PUP-6680) Descendant providers do not inherit features from ancestors

0 views
Skip to first unread message

Mikhail T. (JIRA)

unread,
Sep 5, 2016, 9:45:04 PM9/5/16
to puppe...@googlegroups.com
Mikhail T. created an issue
 
Puppet / Bug PUP-6680
Descendant providers do not inherit features from ancestors
Issue Type: Bug Bug
Affects Versions: PUP 3.8.7
Assignee: Kylo Ginsberg
Components: Types and Providers
Created: 2016/09/05 6:44 PM
Priority: Normal Normal
Reporter: Mikhail T.

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.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Sep 6, 2016, 6:16:03 AM9/6/16
to puppe...@googlegroups.com

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 6:36:03 PM5/16/17
to puppe...@googlegroups.com
Maggie Dreyer assigned an issue to Unassigned
Change By: Maggie Dreyer
Assignee: Kylo Ginsberg

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 6:37:04 PM5/16/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 2:01:02 PM5/18/17
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
May 11, 2018, 4:00:04 PM5/11/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: package type_and_provider api provider triaged
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 5, 2020, 12:53:03 AM3/5/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-6680
 
Re: Descendant providers do not inherit features from ancestors

The gem provider was recently modified to accept a targetable command so that subclassing the gem provider is not necessary. Closing this as we're unlikely to fix the issue of features not being inherited by provider subclasses.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages