`makepkg --cleanbuild` does not remove dotted files under $srcdir
If, for some reason, a PKGBUILD creates dotted files under ${srcdir}
as part of its normal operation:
prepare() {
ln -sf ae-${_d_ae_ver} "${srcdir}/ae" # directory name must be "ae" for --rdmd
cd "${srcdir}/btdu"
# all of the commands below write to ${srcdir}/.dub
HOME="${srcdir}" dub add-local ../ae ${_d_ae_ver}
HOME="${srcdir}" dub add-local ../d-btrfs-${_d_btrfs_ver} ${_d_btrfs_ver}
HOME="${srcdir}" dub add-local ../ncurses-${_d_ncurses_ver} ${_d_ncurses_ver}
HOME="${srcdir}" dub add-local ../containers-${_d_emsi_containers_ver} ${_d_emsi_containers_ver}
}
...then running makepkg --cleanbuild
on an unclean $BUILDDIR will fail to remove them.
This is because $srcdir/*
does not match dotted files without dotglob shell option:
https://gitlab.archlinux.org/pacman/pacman/-/blob/331b277eea9cf1be8928986dbb706d738487e93b/scripts/makepkg.sh.in#L1352