Message159993
| Author |
hynek |
| Recipients |
amcnabb, hynek, neologix, r.david.murray |
| Date |
2012年05月05日.14:08:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1336226937.74.0.0593423359181.issue14702@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
>> Charles, I don't think you can blame autofs here. The problem at hand is that makedirs() never checks whether the directory exists (that would trigger the mount too I presume).
>
> Yes, it does. Have a look at line 148:
> """
> if head and tail and not path.exists(head):
> """
Now that's embarrassing. I take everything back and claim the opposite.
>> If you try that approach in this case where /net is non-writable and /net/prodigy appears only on demand, it fails with an EPERM instead.
>
> Actually, no.
> makedirs() does a recursive depth-first traversal:
> makedirs('/net/prodigy/foo') will actually do something like:
> """
> stat('/net/prodigy/foo') == ENOENT
> stat('/net/prodigy') == ENONENT
> mkdir('/net/prodigy') == EPERM
> """
> The NFS mount should appear upon the first - or second - stat() call,
> before mkdir().
>
> But I'd like to be sure about that, that's why I think an strace()
> output would be useful ;-)
I glanced over coreutil's mkdir code and it seems that it changes the directory while creating the directories. I suspect it's related to that. At least it does no fstab parsing. ;) The code is wayyy too intricate to be grokable at glancing though. mkdir -p seems to be quite a can of worms.
Andrew, please send straces. :) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月05日 14:08:57 | hynek | set | recipients:
+ hynek, amcnabb, r.david.murray, neologix |
| 2012年05月05日 14:08:57 | hynek | set | messageid: <1336226937.74.0.0593423359181.issue14702@psf.upfronthosting.co.za> |
| 2012年05月05日 14:08:57 | hynek | link | issue14702 messages |
| 2012年05月05日 14:08:57 | hynek | create |
|