Hi Achim

On Tue, 09 Feb 2016 14:19:25 -0800,
Achim Gratz <strom...@nexgo.de> wrote:
>
>
> […]
>
> Well, the best solution would be to have an option for git-annex to
> switch off that lockdown thing.  Since that's not going to happen soon
> or anytime, try something like:
>
>         $(RMR) $(testdir) || { $(CHMOD) -R u+w $(testdir); $(RMR) $(testdir) }
>
> which of course requires the addition of
>
> CHMOD = chmod
>
> in mk/defaults.mk.

Can you explain how this improves on what I had? The time spent appears to be
the same on my system (tested after clearing the filesystem cache):

$ time /bin/sh -c "if [ -d /tmp/tmp-orgtest/ ] ; then chmod u+w -R 
/tmp/tmp-orgtest/ ; fi ; rm -rf /tmp/orbit-egh/"

real    0m0.219s
user    0m0.004s
sys     0m0.000s

$ time /bin/sh -c "rm -rf /tmp/tmp-orgtest || { chmod -R u+w /tmp/tmp-orgtest; 
rm -rf /tmp/tmp-orgtest ; }"
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test11629xxf/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test11629knZ/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied

real    0m0.240s
user    0m0.000s
sys     0m0.012s

> But it seems that direct mode (however deprecated it is) would allow us
> to do exactly the thing we want, so maybe if the tests would put that
> repo in direct mode we wouldn't even need to do that.  But that doesn't
> seem to work in a v6 repo unless annex.thin is set to true.  What version
> are you testing?

git-annex version: 5.20150731-1build1. In any case, direct mode is a rather
different use case, as I understand it.

best, Erik

Reply via email to