Issue #12221 has been updated by Daniel Pittman.

Category set to package
Status changed from Unreviewed to Requires CLA to be signed
Assignee set to Gary Larizza
Target version set to 2.7.x

Simon Hildrew wrote:
> The pkgdmg provider cleans up files at the end of execution.  This is sane 
> when the file is temporary (e.g. downloaded from an http URI) but not when 
> using a file on an NFS mount or other local filesystem.
[…]
> Having looked at the code I believe that the unlink on pkgdmg.rb:106 should 
> only be attempted if source != cached_source (i.e. a temporary file is being 
> used).  This works for me and I believe is right but I haven't tested this 
> with URI sources.

That looks sane to me, but I want Gary Larizza, one of our mac experts, to take 
a quick look and confirm for me.

Meanwhile, Simon, we need you to sign a CLA; the link is in our "contributing" 
documentation here: 
https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md

It would be nice if you could make this a pull request, etc, but just getting 
the CLA done is enough that we can take the code.  Thanks.

----------------------------------------
Bug #12221: pkgdmg provider deletes files regardless of source
https://projects.puppetlabs.com/issues/12221

Author: Simon Hildrew
Status: Requires CLA to be signed
Priority: Normal
Assignee: Gary Larizza
Category: package
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords: 
Branch: 


The pkgdmg provider cleans up files at the end of execution.  This is sane when 
the file is temporary (e.g. downloaded from an http URI) but not when using a 
file on an NFS mount or other local filesystem.

The error that appears is as follows:
err: /Stage[main]//Package[TeamCity]/ensure: change from absent to present 
failed: Could not set 'present on ensure: Permission denied - 
/osx/teamcity/TeamCity-6.5.3.pkg at /private/var/root/test.pp:5

The permission denied is the provider attempting to delete the file from read 
only NFS.

Despite the error the package is installed correctly and not installed on 
subsequent runs (the cookie check passes).  On an initial run however, 
dependencies are not satisfied.

Having looked at the code I believe that the unlink on pkgdmg.rb:106 should 
only be attempted if source != cached_source (i.e. a temporary file is being 
used).  This works for me and I believe is right but I haven't tested this with 
URI sources.

Workaround is to only use URI sources.


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