# Puppet cannot install ports



## Violator (Jan 11, 2013)

I'm started to learn puppet.
Trying to install port, but get errors.
My example:

```
# cat ./iperf.pp
package { 'benchmarks/iperf':
    ensure => 'installed',
    provider => 'ports',
  }

# puppet apply iperf.pp
Error: Execution of '/usr/local/sbin/portupgrade -N -M BATCH=yes benchmarks/iperf' returned 1: /usr/local/sbin/portupgrade:569:in `chdir': HOME/LOGDIR not set (ArgumentError)
        from /usr/local/sbin/portupgrade:569:in `main'
        from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize'
        from /usr/local/sbin/portupgrade:237:in `new'
        from /usr/local/sbin/portupgrade:237:in `main'
        from /usr/local/sbin/portupgrade:2371

Error: /Stage[main]//Package[benchmarks/iperf]/ensure: change from absent to present failed: Execution of '/usr/local/sbin/portupgrade -N -M BATCH=yes benchmarks/iperf' returned 1: /usr/local/sbin/portupgrade:569:in `chdir': HOME/LOGDIR not set (ArgumentError)
        from /usr/local/sbin/portupgrade:569:in `main'
        from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize'
        from /usr/local/sbin/portupgrade:237:in `new'
        from /usr/local/sbin/portupgrade:237:in `main'
        from /usr/local/sbin/portupgrade:2371
```

If *I* run [cmd=]/usr/local/sbin/portupgrade -N -M BATCH=yes benchmarks/iperf[/cmd] from the command line, there are no errors.


----------



## DutchDaemon (Jan 11, 2013)

Do you have something like 
	
	



```
logdir = something
```
 set in your Puppet configuration? That's the actual complaint of the error message, it seems.


----------



## Violator (Jan 14, 2013)

I located the bug. If portupgrade version 2.4.9.X, then there is no error. On portupgrade-2.4.10.3 error occurs.


----------



## Violator (Jan 15, 2013)

Fixed in 
http://www.freebsd.org/cgi/query-pr.cgi?pr=175281


----------

