keepdir is defined in PMS section 11.3.3.8 "Installation commands" which says: These commands must all be external programs and not bash functions or aliases—that is, they must be callable from xargs. All package managers implement keepdir as a shell function, though. Should we fix the spec or the package managers?
CCing PM maintainers.
keepdir doesn't set any variables, so there's no reason for it to be a function. Also an external command is more in line with dodir. Fixed in Portage, as discussed with zmedico: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=77570d9d3df177dc2cb55a83541965a32dd79c67 Changing this bug to a tracker; I'm going to file new bugs for the other PMs.
(In reply to Ulrich Müller from comment #2) > Fixed in Portage, as discussed with zmedico: > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit; > h=77570d9d3df177dc2cb55a83541965a32dd79c67 This is released in sys-apps/portage-2.2.2.