[Python-modules-team] Bug#686695: Bug#686695: python-graph: FTBFS if built twice in a row: find: `./dot/pygraph/__pycache__': No such file or directory

Jakub Wilk jwilk at debian.org
Fri Feb 28 19:06:59 UTC 2014


* Sandro Tosi <morph at debian.org>, 2014-02-28, 19:49:
>>| find . -name __pycache__ -exec rm -rf {} \;
>>| find: `./dot/pygraph/__pycache__': No such file or directory
[...]
>
>this is really weird! it seems that find is able to find the 
>directories

Here's a minimal way to reproduce the problem:

$ mkdir __pycache__
$ find . -name __pycache__ -exec rm -rf {} \;
find: ‘./__pycache__’: No such file or directory

The trouble is that is that find tries to descend to the directory that 
has just been deleted, which of course doesn't work. Appending -prune to 
the find command-line fixes the problem:

$ mkdir __pycache__
$ find . -name __pycache__ -exec rm -rf {} \; -prune
$ echo $?
0

-- 
Jakub Wilk



More information about the Python-modules-team mailing list