Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

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
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 2.9.8
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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.
Comment by Dan McGee (toofishes) - Wednesday, 25 April 2007, 14:55 GMT
The following command is used in makepkg 3, which should work as well:

cd "$startdir/pkg"
find -depth -type d -empty -delete;

I'll close this soon unless someone can state that this doesn't work.

Loading...