# Using ark to update some files

**URL:** <https://discourse.chef.io/t/using-ark-to-update-some-files/3075>\
**Category:** Chef Infra (archive)\
**Created:** [August 31, 2012, 3:36pm UTC](https://discourse.chef.io/t/using-ark-to-update-some-files/3075 "2012-08-31T15:36:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Autif\_Khan](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Autif\_Khan](https://discourse.chef.io/u/Autif_Khan)\
**Post date:** [August 31, 2012, 3:36pm UTC](https://discourse.chef.io/t/using-ark-to-update-some-files/3075/1 "2012-08-31T15:36:17Z")

</div>

I want to use ark to untar some files at some path. But I am not able  
to update those files by modifying the recipe.

I am using the following recipe:

1 ark ‘app’ do  
2  
3 url '[http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz)’  
4 checksum  
’66a8e3b8716106cfc3436c2edfcb97fc5474b5d48f48fa96cf104c35b705dfaa’  
5  
6 # url '[http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz)’  
7 # checksum  
’13a88b5594ad0180e5547a7a22cdb74a0c3a4f89a45f33a28936e72f00c8fdd4’  
8  
9 action :put  
10 path '/home/koko’  
11 end

The recipe works fine the first time. app-0.0.1 is unzipped correctly  
in /home/koko

The problem is that when I delete lines 3 and 4 and uncomment lines 6  
and 7 and push the recipe to chef server, and then run chef-client on  
a node, I do not get the contents of app-0.0.2.tar.gz in  
/home/koko/app. Those files are unchanged.

Also, the app.tar.gz in cache is unchanged (it is same as app-0.0.1.tar.gz)

However, the recipes in the downloaded cookbooks is indeed changed -  
where lines 3 and 4 are deleted and lines 6 and 7 are uncommented.

So …

What am I doing wrong?

Am I using ark in a way it was not meant to OR am I not using it properly?

Please advise

Thanks

Autif

---

<div class="post-metadata">

**Author:** ![Bryan\_Berry](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_berry/32/213_2.png) [@Bryan\_Berry](https://discourse.chef.io/u/Bryan_Berry)\
**Post date:** [September 1, 2012, 6:16am UTC](https://discourse.chef.io/t/using-ark-to-update-some-files/3075/2 "2012-09-01T06:16:25Z")

</div>

Hey autif, this is indeed a problem with how ark updates changed resources.  
The put action only checks whether the destination folder exists or not. It  
should be smarter than this. As the author of ark, I honestly don't know  
when I will get around to fixing this. I have a huge backlog of other  
public cookbook issues to fix.

Please do create a ticket at [tickets.opscode.com](http://tickets.opscode.com). that will help speed the  
process along  
On Aug 31, 2012 5:36 PM, "Autif Khan" [autif.mlist@gmail.com](mailto:autif.mlist@gmail.com) wrote:

> I want to use ark to untar some files at some path. But I am not able  
> to update those files by modifying the recipe.
> 
> I am using the following recipe:
> 
> 1 ark 'app' do  
> 2  
> 3 url '[http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz)'  
> 4 checksum  
> '66a8e3b8716106cfc3436c2edfcb97fc5474b5d48f48fa96cf104c35b705dfaa'  
> 5  
> 6 # url '[http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz)'  
> 7 # checksum  
> '13a88b5594ad0180e5547a7a22cdb74a0c3a4f89a45f33a28936e72f00c8fdd4'  
> 8  
> 9 action :put  
> 10 path '/home/koko'  
> 11 end
> 
> The recipe works fine the first time. app-0.0.1 is unzipped correctly  
> in /home/koko
> 
> The problem is that when I delete lines 3 and 4 and uncomment lines 6  
> and 7 and push the recipe to chef server, and then run chef-client on  
> a node, I do not get the contents of app-0.0.2.tar.gz in  
> /home/koko/app. Those files are unchanged.
> 
> Also, the app.tar.gz in cache is unchanged (it is same as app-0.0.1.tar.gz)
> 
> However, the recipes in the downloaded cookbooks is indeed changed -  
> where lines 3 and 4 are deleted and lines 6 and 7 are uncommented.
> 
> So ....
> 
> What am I doing wrong?
> 
> Am I using ark in a way it was not meant to OR am I not using it properly?
> 
> Please advise
> 
> Thanks
> 
> Autif

---

<div class="post-metadata">

**Author:** ![Autif\_Khan](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@Autif\_Khan](https://discourse.chef.io/u/Autif_Khan)\
**Post date:** [September 1, 2012, 4:12pm UTC](https://discourse.chef.io/t/using-ark-to-update-some-files/3075/3 "2012-09-01T16:12:21Z")

</div>

I will see if I can send a patch. I hope that the patch can be  
evaluated (accept or reject with comments) more quickly than it will  
take you to implement the change.

Thanks for the response.

Autif

On Sat, Sep 1, 2012 at 2:16 AM, Bryan Berry [bryan.berry@gmail.com](mailto:bryan.berry@gmail.com) wrote:

> Hey autif, this is indeed a problem with how ark updates changed resources.  
> The put action only checks whether the destination folder exists or not. It  
> should be smarter than this. As the author of ark, I honestly don't know  
> when I will get around to fixing this. I have a huge backlog of other public  
> cookbook issues to fix.
> 
> Please do create a ticket at [tickets.opscode.com](http://tickets.opscode.com). that will help speed the  
> process along
> 
> On Aug 31, 2012 5:36 PM, "Autif Khan" [autif.mlist@gmail.com](mailto:autif.mlist@gmail.com) wrote:
> 
> > I want to use ark to untar some files at some path. But I am not able  
> > to update those files by modifying the recipe.
> > 
> > I am using the following recipe:
> > 
> > 1 ark 'app' do  
> > 2  
> > 3 url '[http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.1.tar.gz)'  
> > 4 checksum  
> > '66a8e3b8716106cfc3436c2edfcb97fc5474b5d48f48fa96cf104c35b705dfaa'  
> > 5  
> > 6 # url '[http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz](http://192.168.2.50:8080/ubuntu/app-0.0.2.tar.gz)'  
> > 7 # checksum  
> > '13a88b5594ad0180e5547a7a22cdb74a0c3a4f89a45f33a28936e72f00c8fdd4'  
> > 8  
> > 9 action :put  
> > 10 path '/home/koko'  
> > 11 end
> > 
> > The recipe works fine the first time. app-0.0.1 is unzipped correctly  
> > in /home/koko
> > 
> > The problem is that when I delete lines 3 and 4 and uncomment lines 6  
> > and 7 and push the recipe to chef server, and then run chef-client on  
> > a node, I do not get the contents of app-0.0.2.tar.gz in  
> > /home/koko/app. Those files are unchanged.
> > 
> > Also, the app.tar.gz in cache is unchanged (it is same as  
> > app-0.0.1.tar.gz)
> > 
> > However, the recipes in the downloaded cookbooks is indeed changed -  
> > where lines 3 and 4 are deleted and lines 6 and 7 are uncommented.
> > 
> > So ....
> > 
> > What am I doing wrong?
> > 
> > Am I using ark in a way it was not meant to OR am I not using it properly?
> > 
> > Please advise
> > 
> > Thanks
> > 
> > Autif
