Issue #6400 has been updated by Jeff McCune.

Gabriel Monroy wrote:
> Sure.  It'd be my first Puppet patch, but it sounds like an easy one.  Can 
> you point me to some resources for contributing to the code-base?  I'm not 
> sure where to start..

The best place to start is with our CONTRIBUTING [1] guide.  I also recommend 
hopping into #puppet-dev on irc.freenode.net if you have any questions while 
you're hacking on this.

The approach I'd take is to crack open the package type [2] file and look at 
how a new parameter could be added.  Then, look at updating your favorite 
provider to handle this new parameter.

This new functionality might also need a new "feature" defined in the package 
type since you probably don't want to update every single provider to handle 
this environment parameter.

[1] <https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md>
[2] 
<https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/package.rb>

Hope this helps,
-Jeff
----------------------------------------
Feature #6400: Package type should support environment variables
https://projects.puppetlabs.com/issues/6400#change-77297

Author: Jeff McCune
Status: Accepted
Priority: Normal
Assignee: 
Category: package
Target version: 
Affected Puppet version: 2.6.0
Keywords: apt, dpkg, environment, debian, sudo, SUDO_FORCE_REMOVE, squeeze
Branch: 


## Overview ##

With the release of Debian Squeeze, a customer mentioned some Debian packages 
are beginning to use environment variables to override behavior.  For example, 
the sudo-ldap package will not install if there is no password set on the root 
account.

    # This is needed for removing the sudo package since it won't uninstall
    # when there is no root password set or $SUDO_FORCE_REMOVE != yes
    exec { '/usr/bin/apt-get --force-yes --assume-yes install sudo-ldap':
        environment => 'SUDO_FORCE_REMOVE=yes',
        unless      => '/usr/bin/dpkg -l sudo-ldap|tail -1|grep "^ii"'
    }

## Expected Behavior ##

Like the exec resource type, the package type should support an environment 
parameter to set arbitrary environment variables when installing packages.

## Other notes ##

The customer believes this will only become more prevalent in the future with 
Debian based systems.  While they have not specifically paid for the feature, a 
paying customer has requested we file and address this feature request.

I'll be taking a look into it while I'm on their time today.



-- 
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