Hmmm.  The problem should probably be addressed at the creation site,
by making it recursive, since the per-user case:

>          conf = File.expand_path("~/.puppet")
>          var = File.expand_path("~/.puppet/var")
> +        varparent = File.expand_path("~/")

is now a three way race condition and the system-wide case

>          # Else, use system-wide directories.
>          conf = "/etc/puppet"
>          var = "/var/lib/puppet"
> +        varparent = "/var/lib"

doesn't handle the (admittedly far less likely) case when /var doesn't
exist.   Also, the varparent would be created even if they changed the
var dir, leading to potentially the same failure as before but now
with the optional creation of a directory at the default location.

I'd advocate a mkdir -p style solution, unless anyone can see problems
with that.

-- Markus
-----------------------------------------------------------
The power of accurate observation is
commonly called cynicism by those
who have not got it.  ~George Bernard Shaw
------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to