Hi, Abid. I agree with Nakarin - this smells like a bug. What happens using the latest stable version (3.3.5) ?
Best, Aleksey On Wed, Aug 8, 2012 at 2:05 AM, Abid Khwaja <a...@tyrann.net> wrote: > cf3.2.3 > > Given the following: > > "dir_wl10domain" string => "/apps/bea10/user_projects/domains”; > > "$(def.dir_wl10domain)" file_select => name_age(".*\.out00.*","60"), > depth_search => recurse("3"), > delete => tidy; > > body depth_search recurse(d) > { > depth => "$(d)"; > xdev => "true"; > } > > I get this: > > cf3> -> Using literal pathtype for /apps/bea10/user_projects/domains > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp (0) > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp/servers (1) > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp/servers/myApp1 (2) > cf3> ->> Entering > /apps/bea10/user_projects/domains/myApp/servers/myApp1/logs (3) > cf3> -> Handling file existence constraints on > /apps/bea10/user_projects/domains/myApp/servers/myApp1/logs/myAppLog.out00001 > cf3> -> Verifying file deletions for > /apps/bea10/user_projects/domains/myApp/servers/myApp1/logs/myAppLog.out00001 > cf3> Promise requires deletion of file object > /apps/bea10/user_projects/domains/myApp/servers/myApp1/logs/myAppLog.out00001 > > This lead me to understand that recurse() starts with a zero index value and > increments each subdirectory starting with the subdirectory of the base > specified, i.e., since the base is /apps/bea10/user_projects/domains, > recurse(“0”) refers to /apps/bea10/user_projects/domains/myApp. Easy logic - > I can see how this works. > > So then I do this expecting to age files ONLY in > /apps/bea10/user_projects/domains/myApp: > > "$(def.dir_wl10domain)" file_select => name_age("Snap.*\.trc","14"), > depth_search => recurse("0"), > delete => tidy; > > But what I get is only this: > > cf3> -> Using literal pathtype for /apps/bea10/user_projects/domains > > Files in /apps/bea10/user_projects/domains/myApp are not touched. I try > recurse(“1”) - same result. recurse(“2”) gives me: > > cf3> -> Using literal pathtype for /apps/bea10/user_projects/domains > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp (0) > cf3> -> Handling file existence constraints on > /apps/bea10/user_projects/domains/myApp/Snap545.trc > cf3> -> Verifying file deletions for > /apps/bea10/user_projects/domains/myApp/Snap545.trc > cf3> Promise requires deletion of file object > /apps/bea10/user_projects/domains/myApp/Snap545.trc > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp/servers (1) > cf3> ->> Entering /apps/bea10/user_projects/domains/myApp/servers/myApp1 (2) > > Can someone please explain what happened? > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine -- Upcoming Trainings: "Editing with vi" 31 Aug 2012 at LinuxCon North America in San Diego, CA (http://lcna2012.sched.org/speaker/alekseytsalolikhin) "Time Management for System Administrators" 28 Sep 2012 at Ohio Linux Fest (http://ohiolinux.org/register) "Editing with vi" 28 Sep 2012 at Ohio Linux Fest (http://ohiolinux.org/register) "Automating System Administration with CFEngine 3" 22-25 Oct 2012 in Palo Alto, CA (http://www.eventbrite.com/event/3388161081) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine