FS#7000 - option NOEMPTYDIRS does not work well
Attached to Project:
Pacman
Opened by Francois Charette (Firmicus) - Wednesday, 25 April 2007, 08:55 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 25 April 2007, 18:15 GMT
Opened by Francois Charette (Firmicus) - Wednesday, 25 April 2007, 08:55 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 25 April 2007, 18:15 GMT
|
Details
Summary and Info:
The option NOEMPTYDIRS does not work when a dir and its subdir are both empty. The problem is with this line of code in makepkg (version 2.9.8, line 705): find pkg -mindepth 1 -type d -empty -exec rmdir {} \; It should be find pkg -mindepth 1 -depth -type d -empty -exec rmdir {} \; instead. Steps to Reproduce: >cd ~/tmp >mkdir -p pkg/foo/bar >find pkg -mindepth 1 -type d -empty -exec rmdir {} \; find: pkg/foo/bar: No such file or directory >find pkg -mindepth 1 -depth -type d -empty -exec rmdir {} \; => now the empty dirs are removed under pkg/. |
This task depends upon
Closed by Dan McGee (toofishes)
Wednesday, 25 April 2007, 18:15 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in makepkg3.
Wednesday, 25 April 2007, 18:15 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in makepkg3.
cd "$startdir/pkg"
find -depth -type d -empty -delete;
I'll close this soon unless someone can state that this doesn't work.